[Python-Dev] PEP 385: the charset issue
M.-A. Lemburg
mal at egenix.com
Wed Aug 5 22:04:46 CEST 2009
"Martin v. Löwis" wrote:
>>> These files are in 8859-1 encoding (names in comments, at least):
>>> http://svn.python.org/view/python/trunk/Lib/encodings/punycode.py
>>> http://svn.python.org/view/python/trunk/Lib/test/test_csv.py
>>> http://svn.python.org/view/python/trunk/Tools/i18n/msgfmt.py
>>> http://svn.python.org/view/python/trunk/Tools/i18n/pygettext.py
>>> If they are not marked as "text/plain; charset=iso-8859-1" I think it's
>>> a bug. Either they should be marked, or converted to ascii or utf-8; the
>>> coding pseudocomment (directive) should be changed accordingly.
>>
>> It's certainly ok to convert them to utf-8 (and add the marker anyway).
>
> No, it's not. PEP 8 mandates that non-ASCII code in the Python source
> code is in Latin-1.
Then I guess it's time to change PEP 8 for Python 2.7 ...
"""
Code in the core Python distribution should aways use the ASCII or
UTF-8 encoding together with a PEP 263 encoding comment header.
"""
Since UTF-8 is ASCII compatible, the whole source code will
effectively be UTF-8 encoded.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Aug 05 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-Dev
mailing list