Message338067
From https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-multibytetowidechar:
For the code pages listed below, dwFlags must be set to 0. Otherwise, the function fails with ERROR_INVALID_FLAGS.
50220
50221
50222
50225
50227
50229
57002 through 57011
65000 (UTF-7)
42 (Symbol)
But currently in PyUnicode_DecodeCodePageStateful() it is set to MB_ERR_INVALID_CHARS for all code pages except CP_UTF7. This causes an error for all other code pages list above.
>>> codecs.code_page_decode(50220, b'abc')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [WinError 1004] Invalid flags |
|
Date |
User |
Action |
Args |
2019-03-16 08:59:08 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, lemburg, doerwalter, paul.moore, tim.golden, zach.ware, steve.dower |
2019-03-16 08:59:08 | serhiy.storchaka | set | messageid: <1552726748.1.0.995612438191.issue36312@roundup.psfhosted.org> |
2019-03-16 08:59:08 | serhiy.storchaka | link | issue36312 messages |
2019-03-16 08:59:07 | serhiy.storchaka | create | |
|