summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-09 11:47:29 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-09 11:47:29 +0000
commit0d056121a12e77b7cc5c53a43f4de2be7d68c64f (patch)
treeb90c00e0e128183f5533a44fa1d5d4d5733188ab /roundcubemail/program
parent21813d5ed48117e19811b5a42c42f944289e115a (diff)
- Small improvement for last commit
git-svn-id: https://svn.roundcube.net/trunk@3952 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/include/main.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index 9b6668e63..501a80fa7 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -388,19 +388,19 @@ function rcube_parse_charset($input)
$result = 'WINDOWS-' . $m[2];
}
// LATIN
- else if (preg_match('/(CSISOLATIN|LATIN)(.*)/', $str, $m)) {
+ else if (preg_match('/LATIN(.*)/', $str, $m)) {
$aliases = array('2' => 2, '3' => 3, '4' => 4, '5' => 9, '6' => 10,
'7' => 13, '8' => 14, '9' => 15, '10' => 16,
- 'ARABIC' => 6, 'CYRILLIC' => 5, 'GREEK' => 7, 'HEBREW' => 8);
+ 'ARABIC' => 6, 'CYRILLIC' => 5, 'GREEK' => 7, 'GREEK1' => 7, 'HEBREW' => 8);
// some clients sends windows-1252 text as latin1,
// it is safe to use windows-1252 for all latin1
- if ($m[2] == 1) {
+ if ($m[1] == 1) {
$result = 'WINDOWS-1252';
}
// if iconv is not supported we need ISO labels, it's also safe for iconv
- else if (!empty($aliases[$m[2]])) {
- $result = 'ISO-8859-'.$aliases[$m[2]];
+ else if (!empty($aliases[$m[1]])) {
+ $result = 'ISO-8859-'.$aliases[$m[1]];
}
// iconv requires convertion of e.g. LATIN-1 to LATIN1
else {