[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/email/test test_email_codecs.py, 1.4, 1.5

"Martin v. Löwis" martin at v.loewis.de
Sun Jan 18 16:24:12 EST 2004

Hye-Shik Chang wrote:

>>  codecs.lookup("some-cjk-encoding")
>>except LookupError:
>>  try:
>>    import japanese
>>    japanese.register_aliases()
>>  except ImportError:
>>    pass
> This usage is useful only for -S mode. The recent Asian codecs
> register its aliases by their respective .pth. So, backporting
> CJK codecs won't let Japanese developers code in this way.

Of course, users may have installed JapaneseCodecs with
--without-aliases, in which case the aliases won't be there
(neither automatically, nor after explicitly importing japanese).
I believe mailman use it that way
So people who currently do

   {"shift_jis" : "japanese.shift_jis"})

would have to adjust their code.

I also find that installing JapaneseCodecs on top of a CJK-enabled
Python 2.4 causes shift_jis to use the CJK codec, not the japanese


More information about the Python-Dev mailing list