FreeBSD的locale由三部分组成. 在/usr/share/locale里 注意系统缺省是不支持GBK的. 到zh_CN.EUC目录看一下, LC_COLLATE指向一个通用的la_LN.ASCII/LC_COLLATE,是用colldef生成 源码在/usr/src/share/colldef目录 LC_TIME定义的是时间格式.使用frep生成,其实是一个文本文件. 源码在/usr/src/share/timedef LC_CTYPE是最关键的,负责处理字符集.使用mklocale生成. 源码在/usr/src/share/mklocale/ 所以GBK的locale可以使用zh_CN.EUC的LC_COLLATE和LC_TIME. 但必须扩充zh_CN.EUC的字符集 虽然zh_CN.EUC和gb2312是一样的. 但是系统并没有gb2312的locale(/usr/share/locale目录没有) 你不能设置为zh_CN.GB2312 可以自己在/usr/share/locale建一个联接的 但推荐使用GBK locale
出现locale not supported by C library是系统的原因. 与你的X无关. 所以首先你要保证你的系统locale是正确的. 同时你没有必要自己make make install啊. 安装完系统zh_CN.EUC的locale已经安装在系统了.
|
我不会用csh 所以,我安装了bash chsh -s /usr/local/bin/bash 然后退出重新登录.就可以使用bash了. 放心,不会有什么麻烦. 我一直都是这么用的. 然后你可以修改/etc/profile 加入 export LANG=zh_CN.EUC(你系统有的lcoale) export LC_ALL=zh_CN.EUC 你也可以自己建立 ~/.bash_profile 添加自己用户的内容. 同时,你也可以建立.bash_logout .bash_login 文件,指定相应的行为. 比如,我的bash_logout定义了 clear 每次exit就自动清屏
|
建议你man csh,好好看看关于csh的FILE部分,这里列出了csh需要读取的脚本文件名,下面是我摘录的:
/etc/csh.cshrc Read first by every shell. ConvexOS,
Stellix and Intel use /etc/cshrc and NeXTs
use /etc/cshrc.std. A/UX, AMIX, Cray and
IRIX have no equivalent in csh(1), but
read this file in tcsh anyway. Solaris
2.x does not have it either, but tcsh
reads /etc/.cshrc. (+)
/etc/csh.login Read by login shells after /etc/csh.cshrc.
ConvexOS, Stellix and Intel use
/etc/login, NeXTs use /etc/login.std,
Solaris 2.x uses /etc/.login and A/UX,
AMIX, Cray and IRIX use /etc/cshrc.
~/.tcshrc (+) Read by every shell after /etc/csh.cshrc
or its equivalent.
~/.cshrc Read by every shell, if ~/.tcshrc doesn't
exist, after /etc/csh.cshrc or its equiva-
lent. This manual uses `~/.tcshrc' to
mean `~/.tcshrc or, if ~/.tcshrc is not
found, ~/.cshrc'.
~/.history Read by login shells after ~/.tcshrc if
savehist is set, but see also histfile.
~/.login Read by login shells after ~/.tcshrc or
~/.history. The shell may be compiled to
read ~/.login before instead of after
~/.tcshrc and ~/.history; see the version
shell variable.
~/.cshdirs (+) Read by login shells after ~/.login if
savedirs is set, but see also dirsfile.
/etc/csh.logout Read by login shells at logout. ConvexOS,
Stellix and Intel use /etc/logout and
NeXTs use /etc/logout.std. A/UX, AMIX,
Cray and IRIX have no equivalent in
csh(1), but read this file in tcsh anyway.
Solaris 2.x does not have it either, but
tcsh reads /etc/.logout. (+)
~/.logout Read by login shells at logout after
/etc/csh.logout or its equivalent.
/bin/sh Used to interpret shell scripts not start-
ing with a `#'.
/tmp/sh* Temporary file for `<<'.
/etc/passwd Source of home directories for `~name'
substitutions.
The order in which startup files are read may differ if
the shell was so compiled; see Startup and shutdown and
the version shell variable.
如果读manual不方便的话,可以这样看:
$ man csh | col | less
|