STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Ok. Python 3.3 does now support non-ASCII characters in module paths and names 
on Windows, but only characters encodable to the ANSI code page. To support the 
full Unicode range, we should remove all calls to PyUnicode_EncodeFSDefault() 
on Windows:

  a) parse_source_module() has to encode the filename because the parser has no 
function expecting a filename as a Python object. It uses currently 
PyParser_ASTFromFile().

  b) write_compiled_module() encodes the filename to call open_exclusive(). I 
don't know how to implement open_exclusive() for Windows using Unicode 
filename: open() expects the filename as a byte string. Can we use _Py_fopen() 
(_wfopen)? Or do you need the O_EXCL flag?

  c) _PyImport_LoadDynamicModule() encodes the filename for 
_PyImport_GetDynLoadFunc(). The prototype should be changed, but only on 
Windows, to accept a filename as a Unicode string.

Issue #10785 is the right fix to (a). When #10785 will be fixed, it will be 
easier to fix #9319 crash.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3080>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to