Changeset b8e65ce3 in github
- Timestamp:
- Aug 10, 2007 12:38:29 PM (6 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 8810b6db
- Parents:
- e715986
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/main.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
re715986 rb8e65ce3 10 10 - Make autocomplete for loginform configurable by the skin template 11 11 - Fix compose function from address book (closes #1484426) 12 - Added //IGNORE to iconv call (patch #1484420, closes #1484023) 13 - Check if mbstring supports charset (#1484290 and #1484292) 14 - Prefer iconv over mbstring (as suggested in #1484292) 12 15 - Updated Simplified Chinese localization 13 16 - Added Ukrainian translation -
program/include/main.inc
r31d9efd rb8e65ce3 473 473 474 474 // settings for mbstring module (by Tadashi Jokagi) 475 if (is_null($s_mbstring_loaded)) 476 $MBSTRING = $s_mbstring_loaded = extension_loaded("mbstring"); 477 else 475 if (is_null($s_mbstring_loaded) && ($s_mbstring_loaded = extension_loaded("mbstring"))) 476 { 477 $MBSTRING = array(); 478 foreach (mb_list_encodings() as $charset) 479 $MBSTRING[strtoupper($charset)] = strtoupper($charset); 480 481 // add some alias charsets 482 $MBSTRING['UTF-7'] = "UTF7-IMAP"; 483 $MBSTRING['WINDOWS-1257'] = "ISO-8859-13"; 484 } 485 else if (is_null($s_mbstring_loaded)) 478 486 $MBSTRING = $s_mbstring_loaded = FALSE; 479 487 … … 1050 1058 { 1051 1059 global $MBSTRING; 1060 static $mb_encodings; 1052 1061 1053 1062 $from = strtoupper($from); … … 1057 1066 return $str; 1058 1067 1068 // convert charset using iconv module 1069 if (function_exists('iconv') && $from != 'UTF-7' && $to != 'UTF-7') 1070 return iconv($from, $to . "//IGNORE", $str); 1071 1059 1072 // convert charset using mbstring module 1060 if ($MBSTRING) 1061 { 1062 $to = $to=="UTF-7" ? "UTF7-IMAP" : $to; 1063 $from = $from=="UTF-7" ? "UTF7-IMAP": $from; 1064 1073 if ($MBSTRING && ($mbfrom = $MBSTRING[$from]) && ($mbto = $MBSTRING[$to])) 1074 { 1065 1075 // return if convert succeeded 1066 if (($out = mb_convert_encoding($str, $ to, $from)) != '')1076 if (($out = mb_convert_encoding($str, $mbto, $mbfrom)) != '') 1067 1077 return $out; 1068 1078 } 1069 1070 // convert charset using iconv module1071 if (function_exists('iconv') && $from!='UTF-7' && $to!='UTF-7')1072 return iconv($from, $to, $str);1073 1079 1074 1080 $conv = new utf8();
Note: See TracChangeset
for help on using the changeset viewer.
