Python's 8-bit cleanness deprecated?

Brian Quinlan brian at sweetapp.com
Wed Feb 5 04:32:42 EST 2003


> >And what should happen if an 8-bit char shows up in a unicode
literal?
> 
> Then it is OK to issue a warning or even an error then due to
> unknown 8bit encoding.

The new Python parser expects to receive code in UTF-8 format. If the
code contains ASCII then it is already valid UTF-8. If your code is not
valid UTF-8 then the parser will die.

To solve this problem, all source code is converted to UTF-8 when
loaded. Without knowing the encoding, how can the source be converted to
UTF-8?

Cheers,
Brian






More information about the Python-list mailing list