summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2020-11-06 11:21:16 -0800
committerAdam Hupp <adam@hupp.org>2020-11-06 11:21:16 -0800
commit35026a19d6ff2b1934999ec6fb9c1812e4d4b07e (patch)
tree25dc09027cc07b4108b3588f80dadc600ae50c22
parenta74c994b704d3476e2054cc6332c0a4c49ea1c69 (diff)
downloadpython-magic-35026a19d6ff2b1934999ec6fb9c1812e4d4b07e.tar.gz
complete comment
-rw-r--r--magic.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/magic.py b/magic.py
index 92005bd..ccddf46 100644
--- a/magic.py
+++ b/magic.py
@@ -239,7 +239,8 @@ def maybe_decode(s):
if str == bytes:
return s
else:
- # backslashreplace here because sometimes
+ # backslashreplace here because sometimes libmagic will return metadata in the charset
+ # of the file, which is unknown to us (e.g the title of a Word doc)
return s.decode('utf-8', 'backslashreplace')