[I18n-sig] Codecs for Big Five and GB 2312
Martin v. Loewis
Tue, 31 Oct 2000 21:20:06 +0100
> Than have your application register a new search function which
> does the necessary aliasing.
That's my point: The application author does not *know* all the
aliases in advance. She expects Python to know about these things, for
the same reason that Python knows about many other things (e.g. how
base64 works, or how to find out the format of a database by just
looking at a few bytes).
> Another possibility would be dropping your shift_jis.py codec
> into the sitecodecs package... at your own risk, though, since
> it might overwrite some already installed codec.
See, this just won't work. If I have a package sitecodecs, and
codecs.py just does "import sitecodecs", then shift_jis.py will not be
considered for conversions.
> Using the fully qualified name helps in case you want to use
> different codec implementations for the same encoding.
If you want to do that, you can instantiate the codec yourself, and
use the codec interface. No need to play magic with the strings passed