[issue9821] Support PEP 383 on Windows: mbcs support of surrogateescape error handler

2010-09-10 Thread STINNER Victor
STINNER Victor added the comment: Close this issue: PEP 383 is specific to filesystem using bytes, it is useless on Windows (the problem on Windows is on encoding, not on decoding). -- resolution: -> invalid status: open -> closed ___ Python tracke

[issue9821] Support PEP 383 on Windows: mbcs support of surrogateescape error handler

2010-09-10 Thread STINNER Victor
STINNER Victor added the comment: Oh wait. PEP 383 is a solution to store undecodable bytes in an unicode string, but for mbcs I'm trying to get the opposite: store unicode in bytes and this is not possible (at least with PEP 383). Example with Python 3.1: >>> print("abcŁdef".encode("cp1252"

[issue9821] Support PEP 383 on Windows: mbcs support of surrogateescape error handler

2010-09-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > It would be nice to support PEP 383 (surrogateescape) on Windows, but the > mbcs codec doesn't support it for performance reason. The Windows functions > to encode/decode MBCS don't give

[issue9821] Support PEP 383 on Windows: mbcs support of surrogateescape error handler

2010-09-10 Thread STINNER Victor
New submission from STINNER Victor : It would be nice to support PEP 383 (surrogateescape) on Windows, but the mbcs codec doesn't support it for performance reason. The Windows functions to encode/decode MBCS don't give the index of the unencodable/undecodable character/byte. For encoding, we