From: philippe_mingo Date: Fri, 22 Nov 2002 19:05:37 +0000 (+0000) Subject: Grisha Mokhin X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ecd877a8dea952c37529c626369cebc0bb0f13e4;p=squirrelmail.git Grisha Mokhin git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4195 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/i18n.php b/functions/i18n.php index a9217ace..71599f70 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -50,7 +50,7 @@ function charset_decode ($charset, $string) { } else if ($charset == 'koi8-r') { $ret = charset_decode_koi8r ($string); } else if ($charset == 'windows-1251') { - $ret = charset_decode_koi8r ($string); + $ret = charset_decode_windows_1251 ($string); } else if ($charset == 'windows-1257') { $ret = charset_decode_windows_1257 ($string); } else { @@ -1108,6 +1108,14 @@ function charset_decode_windows_1257 ($string) { return (charset_decode_iso_8859_1($string)); } +/* windows-1251 is Microsoft Cyrillic encoding */ +function charset_decode_windows_1251 ($string) { + // Convert to KOI8-R, then return this decoded. + $string = convert_cyr_string($string, 'w', 'k'); + return charset_decode_koi8r($string); +} + + /* * Set up the language to be output