Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv10948
Modified Files:
i18n.php
Log Message:
Grisha Mokhin
Index: i18n.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/i18n.php,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -w -r1.115 -r1.116
--- i18n.php 21 Nov 2002 16:46:06 -0000 1.115
+++ i18n.php 22 Nov 2002 19:05:37 -0000 1.116
@@ -50,7 +50,7 @@
} 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 {
@@ -1107,6 +1107,14 @@
// Rest of charset is like iso-8859-1
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);
+}
+
/*
|