[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: locales and accented charaters



Nori Heikkinen <nori@sccs.swarthmore.edu> writes:

> on Sun, 27 Oct 2002 01:48:27PM -0500, Stephen Gran insinuated:
> > This one time, at band camp, Nori Heikkinen said:
> > > only problem is ... previously, i'd had LC_ALL=POSIX, which made
> > > ls not intersperse dot-files and non dot-files (which i hate).
> > > just exporting LC_COLLATE=POSIX after I export LC_ALL in my
> > > ~/.zshenv doesn't seem to do it.  
> > > 
> > > there must be a way to individually set these different locales to
> > > different things, no?
> > > 
> > > thanks again,
> > > 
> > > </nori>
> > 
> > You can alias 'ls = LC_COLLATE=POSIX ls' in your ~/.zshenv (I think
> > - using bash here, not sure how zsh deals with aliases).
> 
> zsh deals with aliases pretty much the same as bash.
> 
> tried that before aliasing it -- i didn't know you could just specify
> a variable setting for a single command, that's cool! -- but it
> doesn't seem to work.  `LC_ALL=POSIX ls` does, though ... weird.  i
> don't know why the individual locale variables don't seem to work.
> but i will alias that, and then my problems will be solved.  thanks!

No, I think the previous poster was right.  I think you really want
just LANG=en_US.ISO-8859-1 (or whatever) and LC_COLLATE=C (same as
POSIX).  If you unset all other LC_* variables, then LC_ALL won't be
necessary, and you won't need an alias for ls.  I've been through a
similar process, and that is all that is necessary.

The LANG variable is the master for all of the other LC_* variables,
and each default to it.  If any of the LC_* variables is individually
set then that value is used instead of the LANG default.  LC_ALL
overrides all of the other LC_* variables and LANG, but I can't see
any reason it should ever be needed.

-- 
Carl Johnson		carlj@peak.org



Reply to: