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 Artoria2e5
Recipients Artoria2e5, benjamin.peterson, eryksun, ezio.melotti, larry, ned.deily, paul.moore, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
Date 2016-11-17.00:18:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479341886.99.0.999203666007.issue28712@psf.upfronthosting.co.za>
In-reply-to
Content
> Codecs are strict by default in Python. Call MultiByteToWideChar() with the MB_ERR_INVALID_CHARS flag as Python does.

Great catch. Without MB_ERR_INVALID_CHARS or WC_NO_BEST_FIT_CHARS Windows would perform the "best fit" behavior described in the BestFit files, which is not marked explicitly (they didn't add '<< Best Fit Mapping' like in the readme) in these files and requires checking for existence of reverse mapping[1]. When MB_ERR_INVALID_CHARS is set, Windows would perform a strict check.
  [2]: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/readme.txt

By the way, will there be a 'mbcsbestfitreplace' error handler on Windows to invoke "best fit" behavior? It might be useful for interoperating with common Windows programs and users. (Implementation for other platforms can be constructed from WindowsBestFit charts, but it might be too large relative to its usefulness.)
History
Date User Action Args
2016-11-17 00:18:07Artoria2e5setrecipients: + Artoria2e5, paul.moore, vstinner, larry, tim.golden, benjamin.peterson, ned.deily, ezio.melotti, zach.ware, serhiy.storchaka, eryksun, steve.dower
2016-11-17 00:18:06Artoria2e5setmessageid: <1479341886.99.0.999203666007.issue28712@psf.upfronthosting.co.za>
2016-11-17 00:18:06Artoria2e5linkissue28712 messages
2016-11-17 00:18:06Artoria2e5create