[New-bugs-announce] [issue3739] unicode-internal encoder reports wrong length

Walter Dörwald report at bugs.python.org
Sat Aug 30 15:05:19 CEST 2008

New submission from Walter Dörwald <walter at livinglogic.de>:

The encoder for the "unicode-internal" codec reports the wrong length:

Python 3.0b3+ (py3k, Aug 30 2008, 11:55:21) 
[GCC 4.0.1 (Apple Inc. build 5484)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import codecs
>>> codecs.getencoder("unicode-internal")("a")
(b'a\x00', 2)

I would have expected it to output:

(b'a\x00', 1)


components: Unicode
messages: 72193
nosy: doerwalter
severity: normal
status: open
title: unicode-internal encoder reports wrong length
versions: Python 3.0

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list