[Python-3000] PEP 3137 plan of attack (stage 3)

Christian Heimes lists at cheimes.de
Sat Oct 27 16:23:08 CEST 2007


Guido van Rossum wrote:
>> There are also some issues that mainly crop up in non-English locales.
>> We will try to get to the bottom of those before releasing 3.0a2, but
>> I need help as I'm myself absolutely unable to work with locales (and
>> I don't have access to a Windows box).
> 
> I think Christian and a few others are making progress here.

I've hit another wall of bricks on Windows. It's not possible to run
Python from a directory with non ASCII characters:
http://bugs.python.org/issue1342. I've a patch that reduces the problem
from a segfault to an unrecoverable import error. The remaining problem
seems to lay deep in PC/getpathp.c:Py_GetPath(). It seems that it can't
handle non ASCII chars correctly.

The second line is a fprintf(stderr, "%s\n", char *path). Do you see the
difference between "testäöü" and "testõ÷³"?

c:\testäöü\PCBuild8\win32release>python
c:\testõ÷³\PCBuild8\win32release\python30.zip;c:\testõ÷³\DLLs;c:\
testõ÷³\lib;c:\testõ÷³\lib\plat-win;c:\testõ÷³\lib\lib-tk;c:\testõ÷³\PCBuild8\wi
n32release
Fatal Python error: Py_Initialize: can't initialize sys
standard streams
object  : ImportError('No module named encodings.utf_8',)
type    : ImportError
refcount: 4
address : 00A43540
lost sys.stderr

Christian


More information about the Python-3000 mailing list