This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Jukka Aho, amaury.forgeotdarc, asvetlov, benjamin.peterson, gvanrossum, vstinner
Date 2010-06-18.23:37:42
SpamBayes Score 0.08769169
Marked as misclassified No
Message-id <1276904264.02.0.469231955525.issue4352@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2010-06-18 23:37:44vstinnersetrecipients: + vstinner, gvanrossum, amaury.forgeotdarc, benjamin.peterson, Jukka Aho, asvetlov
2010-06-18 23:37:44vstinnersetmessageid: <1276904264.02.0.469231955525.issue4352@psf.upfronthosting.co.za>
2010-06-18 23:37:42vstinnerlinkissue4352 messages
2010-06-18 23:37:42vstinnercreate