summaryrefslogtreecommitdiffstats
path: root/newlib/libc/locale/locale.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/locale/locale.c')
-rw-r--r--newlib/libc/locale/locale.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 2b1f6dd33..8444be961 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -817,7 +817,13 @@ restart:
|| strncmp (locale, "zh", 2) == 0));
}
else if (category == LC_MESSAGES)
- strcpy (lc_message_charset, charset);
+ {
+#ifdef __CYGWIN__
+ ret = __messages_load_locale (locale, (void *) l_wctomb, charset);
+ if (!ret)
+#endif
+ strcpy (lc_message_charset, charset);
+ }
#ifdef __CYGWIN__
else if (category == LC_COLLATE)
ret = __collate_load_locale (locale, (void *) l_mbtowc, charset);