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

I worked again on the patch. I opened new issues to prepare the new mbcs codec:
 - #8966: ctypes: remove implicit conversion between unicode and bytes
 - #8967: Create PyErr_GetWindowsMessage() function
 - #8969: Windows: use (mbcs in) strict mode to encode/decode filenames, and 
enable os.fsencode()

#8967 can be used to get the translated message of a mbcs encode error. 
PyErr_GetWindowsMessage() returns a PyUnicodeObject, whereas 
make_translate_exception() and PyUnicodeTranslateError_SetReason() expect a 
"char*". Another patch is requied: translate_reason_unicode.patch (attached to 
this issue, not tested). But I don't think that the message is very important 
for now :-)

#8784 (tarfile/Windows: Don't use mbcs as the default encoding) is still open.

----------
Added file: http://bugs.python.org/file17618/translate_reason_unicode.patch

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

Reply via email to