Bruno Haible -

> > the documentation doesn't have a list of locale names that work.
> 
> But it has a command to give the list. "man 1 locale" =>
> 
>        locale [ -a | -m]
> 
>        -a, --all-locales
> 
>                Write names of available locales.

        % locale -a
        locale: Command not found.

I'm on FreeBSD 4.2.  Perhaps Linux has this command.

> You also have the locale file description in "man 5 locale" and the
> general locale overview in "man 7 locale".

        % man 5 locale
        No entry for locale in section 5 of the manual
        % man 7 locale
        No entry for locale in section 7 of the manual

You are probably going to suggest I install Linux instead...

> If you want it for a particular xterm, you have to look in the xterm
> menus. Unfortunately, in the old 8-bit font technology, it is not
> possible to switch locales in a running xterm. (If it already uses an
> ISO-8859-1 font, you can't display ISO-8859-5 characters with it.) And
> even with the xterm using ISO-10646 fonts, it's impossible for xterm
> to change the locale of the sh and programs running inside xterm.

        % env LANG=ja_JP.EUC gvim

Works well.  Of course, you have to know exactly the name of the locale, which
is the point I was addressing.

Using an xterm menu will only change the locale of the xterm itself, not the
shell running inside it, right?

> But some other programs (Emacs, yudit 1.x, netscape) allow choosing the
> locale or language in a user-friendly way.

Hmm, I wonder where they get the list of supported locales.  I don't know a
library call for that.

> If you look in the system tool (YaST or similar) or window manager
> (KDE Control Center -> Desktop -> Languages) you'll find a way to
> choose the locale for the entire system or desktop.

These tools are system specific, they probably know to find the directory that
contains the locales.  For a portable program like Vim, is there a generic way
that works on all Unix systems?

Anyway, whatever ways you can think of to set the locale in a nice way for
applications that include this support, there will still be plenty situations
where you have to type the locale name.  I still haven't heard a reason why
setlocale() needs to be case-sensitive.

-- 
hundred-and-one symptoms of being an internet addict:
46. Your wife makes a new rule: "The computer cannot come to bed."

 ///  Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.moolenaar.net  \\\
(((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
 \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to