[New-bugs-announce] [issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')
report at bugs.python.org
Fri May 6 11:16:17 CEST 2011
New submission from zy <cdqzzy at gmail.com>:
The expected result of s.decode('gb2312', 'ignore') is u"\n", while in 2.6.6 it is u"".
s can be replaced with chr(m) + chr(n) , where m is in range of 128~255, and n in 0~127.
In the above cases, try decoding from chr(n) will never interfere with later parts in the string if there is any, since chr(n) do not start a multibyte sequence.
title: Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')
versions: Python 2.6
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce