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

Problem on zh_CN.GB2312 locale



Greetings,

I have upgraded my system with the following packages:

Package: locales
Version: 2.1.3-7

Package: libc6
Version: 2.1.3-7

and I tested the zh_CN.GB2312 locale, but it cannot work. Although I set

export LC_CTYPE=zh_CN.GB2312

and run "/usr/bin/locale", it shows:

LANG=POSIX
LC_CTYPE=zh_CN.GB2312
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_ALL=

This is correct. However, when I run the following test program:

#include <stdio.h>
#include <locale.h>
main()
{
    char *lc_ctype = NULL;

    lc_ctype = setlocale(LC_CTYPE, "");
    if (lc_ctype)
        printf("LC_CTYPE = %s\n", lc_ctype);
}

which is compiled with "gcc <filename>.c", the program false on setting
the locale. I have compared the zh_CN.GB2312 locale data contents with
the one compiled from:

	ftp://xcin.linux.org.tw/pub/xcin/i18n/i18n_tool.tar.gz

which also contain the zh_CN.GB2312 locale data, I found the difference:

>From Debian package: locales_2.1.3-7:
-rw-r--r--    1 root     root       352846 May  4  1999 LC_COLLATE
-rw-r--r--    1 root     root       236744 May  4  1999 LC_CTYPE
drwxr-xr-x    2 root     root         1024 May  4  1999 LC_MESSAGES/
-rw-r--r--    1 root     root           95 May  4  1999 LC_MONETARY
-rw-r--r--    1 root     root           26 May  4  1999 LC_NUMERIC
-rw-r--r--    1 root     root          520 May  4  1999 LC_TIME

>From i18n_tool.tar.gz:
-rw-r--r--    1 root     root       352846 Apr  6 19:28 LC_COLLATE
-rw-r--r--    1 root     root        16588 Apr  6 19:28 LC_CTYPE
drwxr-xr-x    2 root     root         1024 Apr  6 19:28 LC_MESSAGES/
-rw-r--r--    1 root     root           95 Apr  6 19:28 LC_MONETARY
-rw-r--r--    1 root     root           26 Apr  6 19:28 LC_NUMERIC
-rw-r--r--    1 root     root          520 Apr  6 19:28 LC_TIME

I found that the LC_CTYPE is very different, however, the one in Debian
package cannot work, but the one in i18n_tool.tar.gz package works.
Therefore, I suggest that someone could take a look at it.

Best Regards,


T.H.Hsieh


-- 
[ This mail was originally sent to  debian-chinese@lists.debian.org ]
[ and was forwarded to this list automatically. Big5 characters are ]
[ also converted to GB at the same time, Please note that there may ]
[ be errors during the conversion as this is not done by a human!   ]


Reply to: