[Python-Dev] Regression in unicodestr.encode()?
Martin v. Loewis
10 Apr 2002 22:04:13 +0200
"M.-A. Lemburg" <firstname.lastname@example.org> writes:
> > Ah, yes, you're right.
> That is... instrumenting the codec I get these results:
> cbWritten=126, cbAllocated=144
> end of string = 'ck git und'
> '\xe6\xad\xa3\xe7\xa2\xba\xe3....das Nunstuck git u \x8f'
> (the last two bytes seem to be random data, they change
> from run to run)
Are you saying it does not write past cbAllocated? It certainly does:
Just check then length of the encoded string. In the corrected
version, the proper length of the encoded string is 158.