[I18n-sig] Intro + Encoding names issue

M.-A. Lemburg mal@lemburg.com
Mon, 29 Oct 2001 09:43:59 +0100


"Martin v. Loewis" wrote:
> 
> > If everybody agrees with pointing Python at Tamito's package for the
> > encodings he supports in his package, then I think we should simply
> > add these aliases to the core encodings package. He did a great
> > job on those codecs and the licenses fit in as well.
> 
> I don't like this approach. There must be a solution that allows
> installation of additional codecs without modifying the core, and
> there is one.

I know... just wanted to make it easier on the user, but you have
a point: there's more than just one codec out there for most 
encodings.
 
> Furthermore, there are alternative codecs for Japanese, e.g. the iconv
> codec also supports euc-jp if the underlying iconv implementation
> supports it; most do. If euc-jp would be a built-in alias to
> japanese.euc-jp, and if the japanese package is not installed, the
> iconv codec would have no chance of finding it.

True.

You also touch a wound spot here: there's currently no way to
override codecs which are available in the encodings package since
the encodings search function is always installed before all other
search functions. Perhaps we ought to let applications register 
their search function before the encodings one too ?!
 
> Finally, I think this would be misuse of the aliases
> mechanism. Aliases should convert to the canonical form of the
> character set name. I'd argue that the canonical form is the name that
> IANA has assigned to this character set, or atleast the alias that
> IANA designates as preferred MIME name. For euc-jp, the name is
> Extended_UNIX_Code_Packed_Format_for_Japanese; the preferred MIME name
> is EUC-JP. Installing an alias that converts euc-jp to japanese.euc-jp
> is definitely wrong.

Ok. Forget about the idea ;-)

It's probably better to include the alias support in the application
and then make the installation of the right codec packages a
requirement during installation of the application.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/