diff options
Diffstat (limited to 'newlib/libc/locale')
-rw-r--r-- | newlib/libc/locale/locale.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c index 4dd773463..1cbfa4074 100644 --- a/newlib/libc/locale/locale.c +++ b/newlib/libc/locale/locale.c @@ -83,7 +83,7 @@ dash, <<"EUC-JP">> and <<"EUC-KR">>. corresponding LC_* environment variables and $LANG according to POSIX rules. 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">>. Any other modifier is ignored. <<"cjknarrow">>, in conjunction with one @@ -547,6 +547,7 @@ loadlocale(struct _reent *p, int category) l_mbtowc = __utf8_mbtowc; #endif break; +#ifndef __CYGWIN__ case 'J': case 'j': if (strcasecmp (charset, "JIS")) @@ -558,6 +559,7 @@ loadlocale(struct _reent *p, int category) l_mbtowc = __jis_mbtowc; #endif break; +#endif case 'E': case 'e': if (!strcasecmp (charset, "EUCJP") || !strcasecmp (charset, "EUC-JP")) @@ -716,6 +718,17 @@ loadlocale(struct _reent *p, int category) 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 + break; #endif /* __CYGWIN__ */ default: return NULL; |