summaryrefslogtreecommitdiff
path: root/program/include/rcube_shared.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-10-21 09:41:32 +0000
committerthomascube <thomas@roundcube.net>2008-10-21 09:41:32 +0000
commitb58f11841539035f8fa06c2a0e64dd9199d6a089 (patch)
tree15acefd04d57c6efd295f2d8b8d364f86f69dee7 /program/include/rcube_shared.inc
parenta2451ccbc994a1de54be7afd118832991d1f83aa (diff)
Improve vcard import (#1485502); try utf-8 first in charset detection
Diffstat (limited to 'program/include/rcube_shared.inc')
-rw-r--r--program/include/rcube_shared.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index 3b63d9c0e..26de5b45c 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -575,12 +575,12 @@ function rc_detect_encoding($string, $failover='')
// FIXME: the order is important, because sometimes
// iso string is detected as euc-jp and etc.
$enc = array(
- 'SJIS', 'BIG5', 'GB2312', 'UTF-8',
- 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4',
- 'ISO-8859-5', 'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9',
- 'ISO-8859-10', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16',
- 'WINDOWS-1252', 'WINDOWS-1251', 'EUC-JP', 'EUC-TW', 'KOI8-R',
- 'ISO-2022-KR', 'ISO-2022-JP'
+ 'UTF-8', 'SJIS', 'BIG5', 'GB2312',
+ 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4',
+ 'ISO-8859-5', 'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9',
+ 'ISO-8859-10', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16',
+ 'WINDOWS-1252', 'WINDOWS-1251', 'EUC-JP', 'EUC-TW', 'KOI8-R',
+ 'ISO-2022-KR', 'ISO-2022-JP'
);
$result = mb_detect_encoding($string, join(',', $enc));