diff options
author | Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com> | 2020-06-29 14:06:48 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 11:36:48 +0300 |
commit | 7f569c9bc0079906012b3034d30fe8abc742e7fc (patch) | |
tree | 092de759fa960b01e0d153268a835ec0e25dbfcc /Lib/mimetypes.py | |
parent | e4f1fe6edb216e04da03ae80b462ca273f00255b (diff) | |
download | cpython-git-7f569c9bc0079906012b3034d30fe8abc742e7fc.tar.gz |
bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)
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 61bfff1635..f3343c8054 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -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: |