Subject: Re: workaround for pkg/14051
To: None <soda@sra.co.jp>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-userlevel
Date: 01/24/2002 03:17:28
> From: Noriyuki Soda <soda@sra.co.jp>
> > >>>>> On Tue, 22 Jan 2002 02:00:42 +0900 (JST),
> > 	YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> said:
> > 
> > > - make symlinks(like de_DE.ISO8859-1 -> de) in /usr/share/nls.
> > 
> > Hmmm. I'm not sure whether symlink is the right way or not to solve
> > the locale alias problem.
> > 
> > I personally prefer alias configuration file to symbolic link, because
> > configuration file can centralize the alias configuration, when there
> > are several hierarchies for locale related database
> > (e.g. /usr/share/nls/XXX and /usr/pkg/share/nls/XXX).
> > If we use symbolic link to resolve locale alias, we have to have
> > several symbolic links for one alias in this case.
> > Although symbolic link is much simpler mechanism than alias
> > configuration file...
> 
> like /usr/share/nls/nlsalias.db ?
> I agree that it sounds better than symlinks.
> I'll try to implement it before commit previous patches.
> thanks.

I made and put them at:
http://www2q.biglobe.ne.jp/~yama/file/nls/nlsdiff.tgz
http://www2q.biglobe.ne.jp/~yama/file/nls/mkaliasdb.tgz

you can do like:
% mkaliasdb -f nlsalias -o /usr/share/nls/nls.aliases

and libc looks nls.aliases file for mapping locale names to
nls names.

format of nlsalias is similar to X11/locale/locale.aliases
and nls.alias is berkley db format(BTREE).

I intended that mkaliasdb utility can be used for other purposes.
(eg. iconv encoding name aliases)
but I think it's name isn't so good
because it's confusing to mkalias(8). ;-)

comments?

---
YAMAMOTO Takashi<yamt@mwd.biglobe.ne.jp>