diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-03 08:05:59 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-10-03 08:05:59 +0000 |
| commit | f52db33f5b6c2de8a5ddf58287db09c90fdddc06 (patch) | |
| tree | 0dd782c5aa9eb0a7a4f64d9238928685f5eb1025 /roundcubemail/program/include/rcube_vcard.php | |
| parent | 2ea46b7e30e08facaa8b9fde9b05862fb7719130 (diff) | |
- Add support for SJIS, GB2312, BIG5 in rc_detect_encoding()
- Fix vCard file encoding detection for non-UTF-8 strings (#1485410)
git-svn-id: https://svn.roundcube.net/trunk@1927 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_vcard.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_vcard.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_vcard.php b/roundcubemail/program/include/rcube_vcard.php index 8cc390c7a..ca7ca0822 100644 --- a/roundcubemail/program/include/rcube_vcard.php +++ b/roundcubemail/program/include/rcube_vcard.php @@ -396,6 +396,9 @@ class rcube_vcard if (substr($string, 0, 2) == "\xFF\xFE") return 'UTF-16LE'; // Little Endian if (substr($string, 0, 3) == "\xEF\xBB\xBF") return 'UTF-8'; + if ($enc = rc_detect_encoding($string)) + return $enc; + // No match, check for UTF-8 // from http://w3.org/International/questions/qa-forms-utf-8.html if (preg_match('/\A( |
