Subject: Re: Permit loose matching of codeset names in locales
To: None <tech-userlevel@netbsd.org>
From: Ian Lance Taylor <ian@wasabisystems.com>
List: tech-userlevel
Date: 09/03/2004 00:18:10
Ian Zagorskih <ianzag@megasignal.com> writes:

> On Friday 03 September 2004 10:25, Ian Lance Taylor wrote:
> >
> > This patch implements loose codeset matching for NetBSD along the same
> > lines as Linux.  If the codeset is specified using the exact NetBSD
> > name, the result should be very nearly as efficient as today's code.
> > Otherwise, the code does a directory search looking for a matching
> > name.
> >
> > Does anybody object to this patch?
> >
> > If nobody objects, whose approval should I seek before checking this
> > in?
> 
> Interesting idea. Right now i'm using "export LANG=ru_RU.KOI8-R" and it works 
> quite fine with console/X and so on. With this patch i can use for example 
> "export LANG=ru_RU.koi8r". But what about iconv() ? Will iconv recognize new 
> locale specification style ?

Well, no.  I didn't realize that there were other ways to specify the
codeset name.

I'm not sure whether there is any overlap between the codesets used by
iconv and the codesets used by LANG, et. al., except for convention.
That is, I think changing it for iconv requires changing a completely
different piece of code.  Still, it does suggest that the function for
canonicalizing the codeset name should be shared somewhere.

Are there any other functions which uses codeset names?

Ian