diff options
Diffstat (limited to 'newlib/libc/locale/locale.c')
-rw-r--r-- | newlib/libc/locale/locale.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c index e1f45335a..4487f7d47 100644 --- a/newlib/libc/locale/locale.c +++ b/newlib/libc/locale/locale.c @@ -140,13 +140,16 @@ _DEFUN(_setlocale_r, (p, category, locale), { if (strcmp (locale, "C") && strcmp (locale, "") && strcmp (locale, "C") && strcmp (locale, "C-JIS") && - strcmp (locale, "C-EUCJP") && strcmp (locale, "C-SJIS")) + strcmp (locale, "C-EUCJP") && strcmp (locale, "C-SJIS") && + strcmp (locale, "UTF-8")) return 0; strcpy (last_lc_ctype, lc_ctype); strcpy (lc_ctype, locale); - if (!strcmp (locale, "C-JIS")) + if (!strcmp (locale, "UTF-8")) + __mb_cur_max = 6; + else if (!strcmp (locale, "C-JIS")) __mb_cur_max = 8; else if (strlen (locale) > 1) __mb_cur_max = 2; |