April 25, 2013
3:39 p.m.
On Thu, Apr 25, 2013 at 4:22 PM, MRAB <python@mrabarnett.plus.com> wrote:
The JSON specification says that it's text. Its string literals can contain Unicode codepoints. It needs to be encoded to bytes for transmission and storage, but JSON itself is not a bytestring format.
OK, fair enough.
base64 is a way of encoding binary data as text.
It's a way of encoding binary data using ASCII. There is a subtle but important difference.
In Python 3 we're trying to stop mixing binary data (bytestrings) with text (Unicode strings).
Yup. And that's why a byte64 encoding shouldn't return Unicode strings. //Lennart