[issue850997] mbcs encoding ignores errors
STINNER Victor
report at bugs.python.org
Fri Jun 11 02:54:18 CEST 2010
STINNER Victor <victor.stinner at 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 <report at bugs.python.org>
<http://bugs.python.org/issue850997>
_______________________________________
More information about the Python-bugs-list
mailing list