diff options
author | Adam Hupp <adam@hupp.org> | 2017-11-20 10:10:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-20 10:10:57 -0800 |
commit | 2d4e63630b576a04ac9c442eaf38caa768c98a60 (patch) | |
tree | 475284bf6eadbad7594f8b196d05d844c12e8341 | |
parent | b8ab66995a41dc68007732051e45c8e2ff1c9fb2 (diff) | |
parent | ae77035e79a74f38437407c29a3966cfcad7d1ae (diff) | |
download | python-magic-2d4e63630b576a04ac9c442eaf38caa768c98a60.tar.gz |
Merge pull request #144 from nicfit/master
Handle incorrectly encoded file names
-rw-r--r-- | magic.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -218,7 +218,7 @@ def coerce_filename(filename): (sys.version_info[0] >= 3 and isinstance(filename, str)) if is_unicode: - return filename.encode('utf-8') + return filename.encode('utf-8', 'surrogateescape') else: return filename |