[PATCH] Rename "CP949" to "eucKR"

Corinna Vinschen vinschen@redhat.com
Wed Mar 25 15:59:00 GMT 2009


On Mar 24 19:20, Corinna Vinschen wrote:
> Hi,
> 
> I just applied the below patch, which reanems "CP949" to "eucKR" as it
> is called on other systems.

And another one.  "GBK" s actually called "GB2312" in the real world.
Sorry for the confusion.


Corinna


	* libc/locale/locale.c (loadlocale): Rename charset "GBK" to
	"GB2312".  Fix documentation accordingly.


Index: libc/locale/locale.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/locale/locale.c,v
retrieving revision 1.13
diff -u -p -r1.13 locale.c
--- libc/locale/locale.c	24 Mar 2009 18:18:14 -0000	1.13
+++ libc/locale/locale.c	25 Mar 2009 08:59:34 -0000
@@ -58,8 +58,8 @@ are <<"UTF-8">>, <<"JIS">>, <<"EUCJP">>/
 (<<"">> is also accepted; if given, the settings are read from the
 corresponding LC_* environment variables and $LANG according to POSIX rules.
 
-Under Cygwin, this implementation additionally supports the charsets <<"GBK">>,
-<<"eucKR">>, and <<"Big5">>.
+Under Cygwin, this implementation additionally supports the charsets
+<<"GB2312">>, <<"eucKR">>, and <<"Big5">>.
 
 If you use <<NULL>> as the <[locale]> argument, <<setlocale>> returns
 a pointer to the string representing the current locale (always
@@ -572,7 +572,7 @@ loadlocale(struct _reent *p, int categor
       break;
 #ifdef __CYGWIN__
     case 'G':
-      if (strcmp (charset, "GBK"))
+      if (strcmp (charset, "GB2312"))
       	return NULL;
       mbc_max = 2;
 #ifdef _MB_CAPABLE


-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat



More information about the Newlib mailing list