[Python-ideas] Strings can sometimes convert to bytes without an encoding
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Jun 15 01:51:46 EDT 2016
Franklin? Lee wrote:
> If the string only has code points in range(128), encoding is optional
> (and useless anyway).
No, it's not useless. It's possible to have an encoding
that takes code points in the range 0-127 to something
other than their ASCII equivalents. UTF-16, for example.
You're effectively suggesting that ASCII or Latin-1
should be assumed as a default encoding, which seems like
a bad idea.
--
Greg
More information about the Python-ideas
mailing list