[Distutils] Re: [I18n-sig] Codecs for Big Five and GB 2312

M.-A. Lemburg mal@lemburg.com
Tue, 31 Oct 2000 15:49:43 +0100

"Martin v. Loewis" wrote:
> > No. You wouldn't hide these ImportErrors if you rely on the
> > packages being installed.
> That's my point. Most applications don't really *rely* on them. It's a
> matter of the data the user passes to the application. If data are
> processed whose encoding is not known, then the application will get a
> UnicodeError, which it will translate to some error message in
> advance. It doesn't know or care what the specific encoding was - the
> application itself only deals with Unicode strings.

Ok, but why is installing the codecs using a separate package and
then adding them to site.py such a pain ?
> > If the application doesn't care for the specific encodings being
> > installed, then the administrator could add these imports to the
> > sitecustomize.py module after installing the codec packages. I don't
> > think that doing this automatically is a good idea.
> I think it is, and apparently Tamito thinks that way as well, since
> the JapaneseCodecs install themselves into the Python installation, to
> be always available.

No third-party package should install itself into the standard
Python installation. That's simply wrong.

> You shouldn't attempt to declare some feature as
> useless when there is a demonstrated need for it - instead, you should
> strive to provide the feature somehow if you disagree with the
> mechanism that is currently used to achieve it.

Which I did by proposing to have the encodings search function
try to import a package called 'sitecodecs'. The JapaneseCodecs
package would then install itself into that site specific
host package.

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/