diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-14 01:05:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-14 01:05:10 (GMT) |
commit | 0e7e715a117ca5f29d53890550ff00447f0c2dc5 (patch) | |
tree | f08f9b8444d04c1edab37cbdf791202bae31b8ed /Lib/mimetypes.py | |
parent | 792b47f6caba35c996db8361d06a0368eb58bea0 (diff) | |
parent | 82ac9bcdb3844369fd9274b559fab073a0142b1e (diff) | |
download | cpython-0e7e715a117ca5f29d53890550ff00447f0c2dc5.zip cpython-0e7e715a117ca5f29d53890550ff00447f0c2dc5.tar.gz cpython-0e7e715a117ca5f29d53890550ff00447f0c2dc5.tar.bz2 |
(Merge 3.2) Issue #13025: mimetypes is now reading MIME types using the UTF-8
encoding, instead of the locale encoding.
Diffstat (limited to 'Lib/mimetypes.py')
-rw-r--r-- | Lib/mimetypes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 41af94b..464c9a6 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -199,7 +199,7 @@ class MimeTypes: list of standard types, else to the list of non-standard types. """ - with open(filename) as fp: + with open(filename, encoding='utf-8') as fp: self.readfp(fp, strict) def readfp(self, fp, strict=True): |