* libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.
Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
This commit is contained in:
parent
7351076e17
commit
c631824a8e
|
@ -1,3 +1,8 @@
|
||||||
|
2010-01-23 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.
|
||||||
|
Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
|
||||||
|
|
||||||
2010-01-22 Corinna Vinschen <corinna@vinschen.de>
|
2010-01-22 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* libc/locale/lmonetary.c (__monetary_load_locale): Take additional
|
* libc/locale/lmonetary.c (__monetary_load_locale): Take additional
|
||||||
|
|
|
@ -83,7 +83,7 @@ dash, <<"EUC-JP">> and <<"EUC-KR">>.
|
||||||
corresponding LC_* environment variables and $LANG according to POSIX rules.
|
corresponding LC_* environment variables and $LANG according to POSIX rules.
|
||||||
|
|
||||||
Under Cygwin, this implementation additionally supports the charsets
|
Under Cygwin, this implementation additionally supports the charsets
|
||||||
<<"GBK">>, <<"eucKR">>, and <<"Big5">>.
|
<<"GBK">>, <<"eucKR">>, <<"Big5">>, and <<"TIS-620">>.
|
||||||
|
|
||||||
This implementation also supports a single modifier, <<"cjknarrow">>.
|
This implementation also supports a single modifier, <<"cjknarrow">>.
|
||||||
Any other modifier is ignored. <<"cjknarrow">>, in conjunction with one
|
Any other modifier is ignored. <<"cjknarrow">>, in conjunction with one
|
||||||
|
@ -547,6 +547,7 @@ loadlocale(struct _reent *p, int category)
|
||||||
l_mbtowc = __utf8_mbtowc;
|
l_mbtowc = __utf8_mbtowc;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
#ifndef __CYGWIN__
|
||||||
case 'J':
|
case 'J':
|
||||||
case 'j':
|
case 'j':
|
||||||
if (strcasecmp (charset, "JIS"))
|
if (strcasecmp (charset, "JIS"))
|
||||||
|
@ -558,6 +559,7 @@ loadlocale(struct _reent *p, int category)
|
||||||
l_mbtowc = __jis_mbtowc;
|
l_mbtowc = __jis_mbtowc;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case 'E':
|
case 'E':
|
||||||
case 'e':
|
case 'e':
|
||||||
if (!strcasecmp (charset, "EUCJP") || !strcasecmp (charset, "EUC-JP"))
|
if (!strcasecmp (charset, "EUCJP") || !strcasecmp (charset, "EUC-JP"))
|
||||||
|
@ -714,6 +716,17 @@ loadlocale(struct _reent *p, int category)
|
||||||
#ifdef _MB_CAPABLE
|
#ifdef _MB_CAPABLE
|
||||||
l_wctomb = __big5_wctomb;
|
l_wctomb = __big5_wctomb;
|
||||||
l_mbtowc = __big5_mbtowc;
|
l_mbtowc = __big5_mbtowc;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case 'T':
|
||||||
|
case 't':
|
||||||
|
if (strcasecmp (charset, "TIS620") && strcasecmp (charset, "TIS-620"))
|
||||||
|
return NULL;
|
||||||
|
strcpy (charset, "CP874");
|
||||||
|
mbc_max = 1;
|
||||||
|
#ifdef _MB_CAPABLE
|
||||||
|
l_wctomb = __cp_wctomb;
|
||||||
|
l_mbtowc = __cp_mbtowc;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#endif /* __CYGWIN__ */
|
#endif /* __CYGWIN__ */
|
||||||
|
|
Loading…
Reference in New Issue