[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2020-06-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

However read_mime_types() still uses the locale encoding. See issue41048.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-10-13 Thread STINNER Victor

STINNER Victor  added the comment:

> Please use the file from Fedora in a test.

Done.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-10-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8d8ab3e04363 by Victor Stinner in branch '3.2':
Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
http://hg.python.org/cpython/rev/8d8ab3e04363

New changeset 2c223d686feb by Victor Stinner in branch 'default':
(Merge 3.2) Issue #13025: mimetypes is now reading MIME types using the UTF-8
http://hg.python.org/cpython/rev/2c223d686feb

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-09-23 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> test needed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-09-23 Thread Éric Araujo

Éric Araujo  added the comment:

+1.  I’ve finally understood that open using the locale is Evil™.  Please use 
the file from Fedora in a test.

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-09-20 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Library (Lib), Unicode

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-09-20 Thread STINNER Victor

New submission from STINNER Victor :

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.)

--
files: mimetypes_encoding.patch
keywords: patch
messages: 144357
nosy: haypo, sandro.tosi, terry.reedy
priority: normal
severity: normal
status: open
title: mimetypes should read the rule file using UTF-8, not the locale encoding
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file23219/mimetypes_encoding.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com