A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-January/042080.html below:

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

[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:

>>try:
>>  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

encodings.aliases.aliases.update(
   {"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
codec.

Regards,
Martin


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4