character coding

Matthias B. msbREMOVE-THIS at winterdrache.de
Sun Dec 26 07:18:45 PST 2004


On Thu, 23 Dec 2004 10:00:11 +0100 "Andrei A. Voropaev" <av at simcon-mt.com>
wrote:

> With ls things are simply. Try to add --show-control option. And you'll
> get your characters in the output. 

That switch is dangerous and should not be used. It's not necessary to
make ls show umlauts.

> With rm things are more difficult.
> The program simply does not want to display the characters as they are.

That is not true.

msb:/tmp> cd foo
msb:/tmp/foo> touch äüö
msb:/tmp/foo> ls
äüö
msb:/tmp/foo> rm -i äüö
rm: remove `äüö'? y

Both ls and rm will show the desired behaviour if the LC_* variables are
properly set.

export LANG=de_DE
export LC_ALL=""
export LC_COLLATE=C
export LC_MONETARY=C
export LC_NUMERIC=C
export LC_TIME=C
export LC_MESSAGES=C

These are the settings that the OP probably wants. To make the system
"more German", set the necessary variables to "de_DE", but DON'T do this
blindly for all of them, only for those that you know will fix your
problem (e.g. if you want to get German messages, set LC_MESSAGES=de_DE,
if you want ls to sort in German, set LC_COLLATE=de_DE).

And the most important thing: 

    Never ever set LC_ALL!!!!

MSB

-- 
What color is a chameleon on a mirror?




More information about the lfs-support mailing list