STINNER Victor <[email protected]> added the comment:
I closed issue #850997, mbcs is now really strict by default:
>>> 'h\u00e4kkinen'.encode('mbcs')
UnicodeEncodeError: ...
>>> 'h\u00e4kkinen'.encode('mbcs', 'replace')
"b'hakkinen'"
PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefault() and os.fsencode() use
mbcs with strict error handler on Windows. On other OS, these functions use
surrogateescape error handler, but mbcs only supports strict and replace (to
encode, and strict and ignore to decode).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue4352>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com