Skip to content

Commit 82ac9bc

Browse files
author
Victor Stinner
committed
Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
instead of the locale encoding.
1 parent c1f32ca commit 82ac9bc

File tree

4 files changed

+1464
-3
lines changed

4 files changed

+1464
-3
lines changed

Lib/mimetypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def read(self, filename, strict=True):
199199
list of standard types, else to the list of non-standard
200200
types.
201201
"""
202-
with open(filename) as fp:
202+
with open(filename, encoding='utf-8') as fp:
203203
self.readfp(fp, strict)
204204

205205
def readfp(self, fp, strict=True):

0 commit comments

Comments
 (0)