[Python-Dev] Multilingual programming article on the Red Hat Developer blog
Glenn Linderman
v+python at g.nevcal.com
Wed Sep 17 03:30:32 CEST 2014
On 9/16/2014 5:21 PM, Stephen J. Turnbull wrote:
> It isn't, because the bytes/str problem was that given a str object
> out of context you could not tell whether it was a binary blob or
> text, and if text, you couldn't tell if it was external encoded text
> or internal abstract text.
>
> That is not true here because the representations of characters vs.
> smuggled bytes in str are disjoint sets.
Actually, while it may be true that for the email headers case, all
characters are characters, just the encoding is unknown, it is not
necessarily true that they are in disjoint sets. Some bytes may decode
into characters without needing to be smuggled... maybe not in
text-protocols like email, but in the general case. So then some of the
bytes that should be interpreted as binary data are not in a disjoint
set from characters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140916/2f6197dc/attachment.html>
More information about the Python-Dev
mailing list