Authored by 梁志锋

Merge remote-tracking branch 'remotes/origin/master' into release/4.5

... ... @@ -1736,8 +1736,8 @@ class HelperSearch
*/
public static function pinYin($zh){
$ret = "";
@$s1 = iconv("UTF-8","gb2312", $zh);
@$s2 = iconv("gb2312","UTF-8", $s1);
@$s1 = iconv("UTF-8","gbk//ignore", $zh);
@$s2 = iconv("gbk//ignore","UTF-8", $s1);
if($s2 == $zh){$zh = $s1;}
for($i = 0; $i < strlen($zh); $i++){
$s1 = substr($zh,$i,1);
... ... @@ -1763,8 +1763,8 @@ class HelperSearch
if ($fchar >= ord("A") and $fchar <= ord("z") ) {
return strtoupper($s0{0});
}
$s1 = @iconv("UTF-8","gb2312", $s0);
$s2 = @iconv("gb2312","UTF-8", $s1);
$s1 = @iconv("UTF-8","gbk//ignore", $s0);
$s2 = @iconv("gbk//ignore","UTF-8", $s1);
if ($s2 == $s0) {
$s = $s1;
} else {
... ...