This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: LC_MESSAGES problem ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]