New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unicode-internal encoder reports wrong length #47989
Comments
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) instead. |
Patch fixing unicode-internal encoder for unicode string input: return If the input is not an unicode string, return the number of bytes (I |
Checked in: As IMHO this is somewhat between a feature and a bugfix, I didn't check |
I agree and anyway this encoder is not really important (it looks to |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: