diff options
Diffstat (limited to 'winsup/cygwin/strfuncs.cc')
-rw-r--r-- | winsup/cygwin/strfuncs.cc | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc index b62139409..849bd5dc9 100644 --- a/winsup/cygwin/strfuncs.cc +++ b/winsup/cygwin/strfuncs.cc @@ -352,87 +352,6 @@ __big5_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n, return __db_mbtowc (r, pwc, s, n, 950, state); } -/* Convert Windows codepage to a setlocale compatible character set code. - Called from newlib's setlocale() with codepage set to 0, if the - charset isn't given explicitely in the POSIX compatible locale specifier. - The function also returns a pointer to the corresponding _mbtowc_r - function. */ -extern "C" mbtowc_p -__set_charset_from_codepage (UINT cp, char *charset) -{ - if (cp == 0) - cp = GetACP (); - switch (cp) - { - case 437: - case 720: - case 737: - case 775: - case 850: - case 852: - case 855: - case 857: - case 858: - case 862: - case 866: - case 874: - case 1125: - case 1250: - case 1251: - case 1252: - case 1253: - case 1254: - case 1255: - case 1256: - case 1257: - case 1258: - case 20866: - case 21866: - __small_sprintf (charset, "CP%u", cp); - return __cp_mbtowc; - case 28591: - case 28592: - case 28593: - case 28594: - case 28595: - case 28596: - case 28597: - case 28598: - case 28599: - case 28603: - case 28605: - __small_sprintf (charset, "ISO-8859-%u", cp - 28590); - return __iso_mbtowc; - case 932: - strcpy (charset, "SJIS"); - return __sjis_mbtowc; - case 936: - strcpy (charset, "GBK"); - return __gbk_mbtowc; - case 949: - case 51949: - strcpy (charset, "EUCKR"); - return __kr_mbtowc; - case 950: - strcpy (charset, "BIG5"); - return __big5_mbtowc; - case 50220: - strcpy (charset, "JIS"); - return __jis_mbtowc; - case 20932: - case 51932: - strcpy (charset, "EUCJP"); - return __eucjp_mbtowc; - case 65001: - strcpy (charset, "UTF-8"); - return __utf8_mbtowc; - default: - break; - } - strcpy (charset, "ASCII"); - return __ascii_mbtowc; -} - /* Our own sys_wcstombs/sys_mbstowcs functions differ from the wcstombs/mbstowcs API in three ways: |