From 597441d79b5e911e2f1af78a6f0650250478c681 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 15 Oct 2009 08:08:50 +0000 Subject: * libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporary exception for KOI8 charsets. --- newlib/libc/locale/nl_langinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'newlib/libc/locale') diff --git a/newlib/libc/locale/nl_langinfo.c b/newlib/libc/locale/nl_langinfo.c index 8e60c6b..1bc7c17 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) { -- cgit v1.1