* libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporary

exception for KOI8 charsets.
This commit is contained in:
Corinna Vinschen 2009-10-15 08:08:50 +00:00
parent 776b157219
commit 597441d79b
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-10-15 Corinna Vinschen <corinna@vinschen.de>
* libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporary
exception for KOI8 charsets.
2009-10-13 Eric Blake <ebb9@byu.net>
* libc/include/sys/unistd.h: Add _PC*, _CS*, and _SC* constants

View File

@ -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) {