On 09-06-08 02:58 AM, Tarek Ziadé wrote:
>
> * Should the PEP specify the encoding of text-files? PEP314 doesn't seem to
specify the encoding of PKG-INFO files, which can cause problems when a field
contains data that isn't ASCII.
The encoding used is utf-8 since 2.6. I think we should rather update
PEP 314, and mention it in the upcoming PEP 345 as well,
For the python-wifi-0.3.1 package, I noticed that PKG-INFO uses 'latin1'
encoding.
> grep Author python_wifi.egg-info/PKG-INFO | head -n 1
Author: R�man Joost
> grep Author python_wifi.egg-info/PKG-INFO | hexdump -C | head -n 1
00000000 41 75 74 68 6f 72 3a 20 52 f3 6d 61 6e 20 4a 6f |Author:
R.man Jo|
Note: latin1 uses "f3", while utf-8 uses "c3 b3".
The reason for not using utf-8 in PKG-INFO is perhaps due to the
presence of "# -*- coding: latin1 -*-" in setup.py. Cf. PEP 0263
Indeed, even 'python setup.py --author' sends latin1 encoded bytes (not
utf-8).
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig