[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Campbell Barton
New submission from Campbell Barton ideasma...@gmail.com: Attached is a script which works in linux but not windows XP 32bit with Python 3.1.3. The problem is that the path can be written to when specified as bytes but when escaped it fails. -- components: IO files:

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Campbell Barton
Campbell Barton ideasma...@gmail.com added the comment: note, this bug was reported to me by a user running windows 7, 64bits. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10600 ___

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Use surrogateescape error handler to decode a Windows path is not a good idea. On Windows, the problem is not to decode a path (ANSI = wide char), but to encode a path (wide char = ANSI) to use a function expecting bytes path

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Campbell Barton
Campbell Barton ideasma...@gmail.com added the comment: This bug is with blender3d, were the paths are stored internally in C as simple char arrays - bytes. We could expose all path names as bytes too through our C/python API, this would at least be a 1:1 mapping, however Id prefer using

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is not a bug. You can't expect that using an arbitrary codec (such as UTF-8) with the surrogateescape code, and expect to be able that opening the file will be able to produce the correct filename. This won't work on Unix, in the