Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,

instead of the locale encoding.
This commit is contained in:
Victor Stinner 2011-10-14 03:03:35 +02:00
parent c1f32ca0ad
commit 82ac9bcdb3
4 changed files with 1464 additions and 3 deletions

View file

@ -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):