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 xiang.zhang
Recipients ezio.melotti, malin, vstinner, xiang.zhang
Date 2017-04-06.03:23:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491448992.67.0.282476330948.issue29990@psf.upfronthosting.co.za>
In-reply-to
Content
The table in wikipedia is somewhat complex. I find ftp://ftp.software.ibm.com/software/globalization/documents/gb18030m.pdf and the table in it is same as https://pan.baidu.com/share/link?shareid=2606985291&uk=3341026630 (except 0x80) but in English. I agree with Ma Lin bytes sequences like b'\x81\x30\xFF\x30' are invalid.

For current implementation, you could see:

>>> invalid = b'\x81\x30\xff\x30'
>>> invalid.decode('gb18030').encode('gb18030') == invalid
False
History
Date User Action Args
2017-04-06 03:23:12xiang.zhangsetrecipients: + xiang.zhang, vstinner, ezio.melotti, malin
2017-04-06 03:23:12xiang.zhangsetmessageid: <1491448992.67.0.282476330948.issue29990@psf.upfronthosting.co.za>
2017-04-06 03:23:12xiang.zhanglinkissue29990 messages
2017-04-06 03:23:12xiang.zhangcreate