要让 terminal 正确显示你的母语(not English),还真是件麻烦的事情。下面有篇好文,明天细细研究下。粗看起来,OpenBSD 是没有 native locale 支持的。T_T
http://www.in-ulm.de/~mascheck/locale/根据这里所说
http://en.wikipedia.org/wiki/Localewindows 原来并不支持标准的 locale name 命名,不过 vista 之后开始标准起来。明天一并研究下~
http://msdn.microsoft.com/en-us/library/dd373814(VS.85).aspx------------------- 第二天 ----------------------
先弄清楚 LC_xxx 几个的含义。
- Many eight bit characters are considered to be printable, but not all. (category
LC_CTYPE
) - Sorting order for characters matters (
LC_COLLATE
). In some languages "z" is not the last character in the alphabet. There are even locale values on some systems, that let you distinguish between the different sorting of telephone book and lexica. - national language support: messages and menues in your mothertongue (
LC_MESSAGES
) - time and money formatting (
LC_TIME, LC_MONETARY
)
如果设置了 LC_ALL 则所有的 LC_xx 都会 = LC_ALL。如果没有设置 LC_ALL,可以独立设置 LC_xxx。如果设置了 LANG,所有“没有设置的 LC_xxx”都会 = LANG。
根据第一篇文字的描述,OpenBSD 的 libc 并不支持 unicode,因此我们
不能使用中文目录名、文件名,等等。
OpenBSD doesn't provide real locale support. Concerning printability (LC_CTYPE), it's rather
hardcoded iso8859-1 behaviour since 2.9 (unless you have disabled 8bit support by recompiling libc with -DUSE7BIT).
See also src/lib/libc/gen/ctype_.c.
想在 terimal 中看到中文么,恩,用 xterm 就可以。只要 xterm -en UTF-8
http://kerneltrap.org/mailarchive/openbsd-misc/2007/11/2/380315
不过都在 X 下面了,要不要 xterm 其实意义不大。
i18n 是个巨大的话题 - -! 下次继续研究。
评论