Python's 8-bit cleanness deprecated?

Bengt Richter bokr at oz.net
Wed Feb 5 07:27:01 EST 2003


On Wed, 05 Feb 2003 01:32:42 -0800, Brian Quinlan <brian at sweetapp.com> wrote:

>> >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?
>
How about showing foo.py encoding by naming?
    foo_x_latin1_x_.py
or
    foo-x-_coding__Latin-1_-x-.py
;-)

Regards,
Bengt Richter




More information about the Python-list mailing list