Changeset 6fa87f3 in github
- Timestamp:
- Nov 12, 2008 5:36:09 PM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- e538b3d
- Parents:
- 146977e
- File:
-
- 1 edited
-
program/include/rcube_vcard.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_vcard.php
rf45a174a r6fa87f3 173 173 if ($encoding && $encoding != RCMAIL_CHARSET) { 174 174 $data = rcube_charset_convert($data, $encoding); 175 $data = preg_replace(array('/^[\xFE\xFF]{2}/', '/^\xEF\xBB\xBF/', '/^\x00+/'), '', $data); // also remove BOM 175 176 } 176 177 … … 410 411 if (substr($string, 0, 3) == "\xEF\xBB\xBF") return 'UTF-8'; 411 412 412 if ($enc = rc_detect_encoding($string)) 413 // use mb_detect_encoding() 414 $encodings = array('UTF-8', 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 415 'ISO-8859-4', 'ISO-8859-5', 'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9', 416 'ISO-8859-10', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16', 417 'WINDOWS-1252', 'WINDOWS-1251', 'BIG5', 'GB2312'); 418 419 if (function_exists('mb_detect_encoding') && ($enc = mb_detect_encoding($string, join(',', $encodings)))) 413 420 return $enc; 414 421
Note: See TracChangeset
for help on using the changeset viewer.
