This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: LC_MESSAGES problem ?
- To: libc-alpha at sources dot redhat dot com
- Subject: Re: LC_MESSAGES problem ?
- From: Won-kyu Park <wkpark at chem dot skku dot ac dot kr>
- Date: Tue, 21 Nov 2000 01:47:22 +0900
- References: <20001120175546.A15984@zinc.skku.ac.kr> <m38zqf2eyy.fsf@otr.mynet.cygnus.com>
On Mon, Nov 20, 2000 at 01:02:45AM -0800, Ulrich Drepper wrote:
> Won-kyu Park <wkpark@chem.skku.ac.kr> writes:
>
> > I have a problem with LC_MESSAGES.
>
> Yes, *you* have a problem. LC_CTYPE must always be set for the locale
> you want to use. It defaults to the C locale which uses ASCII and
> therefore cannot display Korean characters. Fix your code.
>
But, Why the default charset is ASCII ? translation messages have it's
own charset info, like 'charset=EUC-KR'.
IMHO, the default guessed charset by intl/loadmsgcat.c have to be fixed by
proper manner.
I attatched my patch for proper guessing the charset. (only for hint)
It works fine for me.
("ANSI_X3.4-1968" value is hardcoded at locale/C-types.c )
--- intl/loadmsgcat.c.orig Tue Nov 21 00:56:25 2000
+++ intl/loadmsgcat.c Tue Nov 21 01:03:08 2000
@@ -302,6 +302,9 @@
{
# ifdef _LIBC
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
+ if (!strcmp(outcharset,"ANSI_X3.4-1968")) {
+ outcharset = charset;
+ }
# else
# if HAVE_ICONV
extern const char *locale_charset (void);
--------------------- EOF --------------------------