[Python-Dev] PEP 263 -- Python Source Code Encoding
Martin v. Loewis
27 Feb 2002 18:26:54 +0100
"M.-A. Lemburg" <firstname.lastname@example.org> writes:
> He also told me that they put raw Shift-JIS and EUC-JP
> into Python literal strings -- just like Europeans do
> with Latin-1.
I expected that much; chosing Latin-1 as the default encoding is
At the moment, declaring either eucJP or or Shift-JIS wouldn't work
with the proposed implementation, anyway, since those encodings are
not supported in the standard Python installation.
> Wouldn't his suggestion be a good compromise for phase 2 ?
This raises the question what exactly should be deprecated. AFAIK,
both eucJP and Shift-JIS use non-ASCII bytes to denote Japanese
characters, so they'd get a DeprecationWarning on every file. However,
they could not put an encoding declaration into the file, as Python
would not recognize the encoding.
I don't see the convention to convert as too much of a stumbling
block; to my knowledge, many editors can display text in both
encodings correctly these days (but I may be wrong with that