Re: Set Locale 一问
On Sun, Jun 04, 2000 at 12:26:46PM +0800, Kam Tik wrote:
> 请问 set locale 共有多少方法?
man 3 setlocale
"... each part of the locale that should be
modified is set according to the environment variables.
The details are implementation dependent. For glibc,
first (regardless of category), the environment variable
LC_ALL is inspected, next the environment variable with
the same name as the category (LC_COLLATE, LC_CTYPE,
LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and finally
the environment variable LANG. The first existing envi□ ronment variable is used."
That is, there should be only one way for proper i18n programs: setting
the environment variables. But there are many ways to set the
> 1. 修改 /etc/environment
> 需要 root access，发现 CorelLinux 1.1 并没有 /etc/environment，自行建立
> 也不行，/etc/environment.corel 也不能运作，真令人费解.........
Because /etc/environment didn't exist in slink? If the login in Corel
Linux doesn't use PAM, try adding "ENVIRON_FILE /etc/environment" to
/etc/login.def. Otherwise add "auth required pam_env.so" to
Please correct me if I'm wrong here :p
> 2. 修改 ~/.bashrc
> 加 export LANG= 、export LC_ALL = ，但是对不是跑 bash shell 的用家起不了
csh and tcsh uses /etc/csh.chsrc and ~/.chsrc, not sure about others ...
That's why it's better to use /etc/environment if it works. :p
Hope the above helps,
Roger So telnet://e-fever.org
spacehunt at e-fever dot org SysOp, e-Fever BBS
GnuPG 1024D/98FAA0AD F2C3 4136 8FB1 7502 0C0C 01B1 0E59 37AC 98FA A0AD
| This message was re-posted from firstname.lastname@example.org
| and converted from big5 to gb2312 by an automatic gateway.