[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 可请教一下!



: 也就是说,要取得 character set 名称的话,必须使用 nl_langinfo()
: 函式。然而,这个函式并非到处都找得到,像 glibc-2.1.X, 现阶段的
: FreeBSD current .... 等都没有。因此,如果您的程式要完全跨平台的
: 话,最好用一个 autoconf 来侦测系统有没有提供这个函式,有的话才
: 呼叫它。

Sorry, 我说错了, glibc-2.1.X 也有这个 nl_langinfo() 函式,故使
用这个函式在 GNU/Linux 平台上应该都没有问题。

但有一点要注意,这是刚刚才发现的。我们现在所用的 zh_CN.GB2312
locale, 其 charmap: GB2312 中的 character set name 是 (见第一行):

<code_set_name> GB2312-1980

我建议最好是改成:

<code_set_name> GB2312

然后用 localedef 重新造一个 zh_CN.GB2312 locale 出来。否则的话,
在使用 nl_langinfo 函式所传回的 encoding name 就不是 GB2312 了,
而是 GB2312-1980。这肯定会造成麻烦的。 :-((((

这一点要请套件包装者留意一下。

T.H.Hsieh

-- 
| This message was re-posted from debian-chinese-big5@lists.debian.org
| and converted from big5 to gb2312 by an automatic gateway.



Reply to: