encoding problem

"Martin v. Löwis" martin at v.loewis.de
Sun Jun 28 08:41:04 EDT 2009


> That is the reason why we have to explicitly declare a encoding as
> long as we have non-ASCII in source.

True - but it doesn't have to be the "correct" encoding. If you
declared your source as latin-1, the effect is the same on byte string
literals, but not on Unicode literals.

In that sense, the encoding declaration only "matters" for Unicode
literals (of course, it also matters for source editors, and in a few
other places).

Regards,
Martin



More information about the Python-list mailing list