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

Problem on zh_CN.GB2312 locale


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:


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

#include <stdio.h>
#include <locale.h>
    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:


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,


[ 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: