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.

作者 vstinner
收信人 Jukka Aho, amaury.forgeotdarc, asvetlov, benjamin.peterson, gvanrossum, vstinner
日期 2010-06-18.23:37:42
SpamBayes Score 0.08769169
Marked as misclassified
Message-id <1276904264.02.0.469231955525.issue4352@psf.upfronthosting.co.za>
In-reply-to
内容
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).
历史
日期 用户 动作 参数
2010-06-18 23:37:44vstinner修改recipients: + vstinner, gvanrossum, amaury.forgeotdarc, benjamin.peterson, Jukka Aho, asvetlov
2010-06-18 23:37:44vstinner修改messageid: <1276904264.02.0.469231955525.issue4352@psf.upfronthosting.co.za>
2010-06-18 23:37:42vstinner链接issue4352 messages
2010-06-18 23:37:42vstinner创建