mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
This commit is contained in:
parent
e4f1fe6edb
commit
7f569c9bc0
4 changed files with 16 additions and 1 deletions
|
@ -372,7 +372,7 @@ def init(files=None):
|
|||
|
||||
def read_mime_types(file):
|
||||
try:
|
||||
f = open(file)
|
||||
f = open(file, encoding='utf-8')
|
||||
except OSError:
|
||||
return None
|
||||
with f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue