You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2011-10-14.01:04:46.668>created_at=<Date2011-09-20.23:07:07.202>labels= ['type-bug', 'library', 'expert-unicode']
title='mimetypes should read the rule file using UTF-8, not the locale encoding'updated_at=<Date2020-06-20.09:11:44.600>user='https://github.com/vstinner'
On Debian and Ubuntu, /etc/mime.types file is pure ASCII, but on Fedora 15 it contains a non-ASCII character, ³ (U+00B3), in the line:
"application/vnd.geocube+xml g3 g³"
And the file is encoded in UTF-8.
That's why Python should read this file from UTF-8 instead of the locale encoding, because the locale encoding can be ASCII. Attached patch implements this idead.
I think that it is a bug and so it should also be fixed in Python 3.2.
(Python 2.7 reads the file in binary mode, it doesn't care of the encoding.)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: