summaryrefslogtreecommitdiff
path: root/Lib/mimetypes.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-14 03:03:35 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-14 03:03:35 +0200
commit82ac9bcdb3844369fd9274b559fab073a0142b1e (patch)
tree09071ca501a9e97f41fc9eb0a5c57792dca84bb2 /Lib/mimetypes.py
parentc1f32ca0ade3a1bc60c0ca18efa4756d3c5282f1 (diff)
downloadcpython-git-82ac9bcdb3844369fd9274b559fab073a0142b1e.tar.gz
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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 961e47fdf5..4b1e2f945a 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):