From 84af47038b4ae3bb5c2ddd29b13e00e33c13cf84 Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 21 Oct 2008 09:41:32 +0000 Subject: Improve vcard import (#1485502); try utf-8 first in charset detection git-svn-id: https://svn.roundcube.net/trunk@1998 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_shared.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'roundcubemail/program/include/rcube_shared.inc') diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc index 3b63d9c0e..26de5b45c 100644 --- a/roundcubemail/program/include/rcube_shared.inc +++ b/roundcubemail/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)); -- cgit v1.2.3