Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-10-15 12:08:50 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-10-15 12:08:50 +0400
commit597441d79b5e911e2f1af78a6f0650250478c681 (patch)
tree0d9ba9424bd43fa9f38121c4b74dc478ce9fa80e /newlib/libc/locale/nl_langinfo.c
parent776b1572192d5a62fe03ee87ca4b70e6125f0629 (diff)
* libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporary
exception for KOI8 charsets.
Diffstat (limited to 'newlib/libc/locale/nl_langinfo.c')
-rw-r--r--newlib/libc/locale/nl_langinfo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/newlib/libc/locale/nl_langinfo.c b/newlib/libc/locale/nl_langinfo.c
index 8e60c6b21..1bc7c17e2 100644
--- a/newlib/libc/locale/nl_langinfo.c
+++ b/newlib/libc/locale/nl_langinfo.c
@@ -60,6 +60,12 @@ _DEFUN(nl_langinfo, (item),
case CODESET:
#ifdef __CYGWIN__
ret = __locale_charset ();
+ /* Temporary exception for KOI8 charsets which are
+ incorrectly treated by calling applications otherwise. */
+ if (strcmp (ret, "CP20866") == 0)
+ ret = "KOI8-R";
+ else if (strcmp (ret, "CP21866") == 0)
+ ret = "KOI8-U";
#else
ret = "";
if ((s = setlocale(LC_CTYPE, NULL)) != NULL) {