>>>> "Glynn" == Glynn Clements
Glynn> Steven T. Hatton wrote:
Do you happen to know what determines how these locale settings
behavior of the OS, and programs? That is, what files and components are
involved in defining the encodings? What actually changes when the values of
the variables are modified? These are the variables in question:
Tue Oct 22 03:42:12:> locale
Glynn> The above are all specified by ANSI C.
Strictly speaking, ISTR that only the macros are specified by the C
standard; the environment variables (ie, the behavior in the default
case) are not. Those are part of the environment, and are specified
by POSIX. (IIRC)
Glynn> These aren't specified by ANSI C, but are part of POSIX or
Glynn> similar Unix standards.
Glynn> Apart from LC_MESSAGES, these variables affect a number of
Glynn> ANSI C functions. The following is from a draft of the C9X
Glynn> standard (although it's basically unchanged since C89).
"info libc locales" will give a bit more information.
Despite my kvetching below, "info libc" is a fount of knowledge.
Almost as good as source, and far more readable. :-)
Glynn> 1. Most of these variables only have an effect if the
Glynn> program calls setlocale() with an empty string as the
Glynn> second argument; otherwise, the program behaves as if the
Glynn> "C" (or "POSIX") locale was selected.
This is false. It depends on the implementation, but I have verified
that with glibc 2.1.something all of the variables above except
LC_COLLATE are affected as a Japanese would expect when the second
argument is "ja_JP". (At that time the Japanese locale was
incomplete, and collation was not implemented -- it's possible that
either localedef or libc6 itself was buggy.)
Glynn> Also, a program may use some variables while ignoring
Glynn> others; E.g. using LC_NUMERIC complicates matters if the
Glynn> program needs to write
src/input-method-xlib.c has an example, along with more kvetching from
Glynn> I have never heard of these.
These are standard, I bet it's ISO 14652 (cf the Debian manpage for
I wish Uli would get around to documenting locale(1) and localedef(1).
Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
My nostalgia for Icon makes me forget about any of the bad things. I don't
have much nostalgia for Perl, so its faults I remember. Scott Gilbert c.l.py