FusionChart chinese display bug has been fixed

3 views
Skip to first unread message

Jixian Wang

unread,
Feb 16, 2012, 6:42:43 AM2/16/12
to openbi...@googlegroups.com
FusionChart chinese display bug has been fixed
thanks Rocky's help.

i found after this replace str, some (only some) chinese characters become bad str.
this bug only happens on BSD and Unix, Mac system.
linux is fine.
charts/lib/FusionCharts_Gen.php
line:1239

before
    $strValue=str_replace("¢","%a2",$strValue);
    $strValue=str_replace("£","%a3",$strValue);
    $strValue=str_replace("€","%E2%82%AC",$strValue);
    $strValue=str_replace("¥","%a5",$strValue);
    $strValue=str_replace("₣","%e2%82%a3",$strValue);
after fix:

if(function_exists("mb_ereg_replace")){
    $strValue=mb_ereg_replace("/¢/","%a2",$strValue);
    $strValue=mb_ereg_replace("/£/","%a3",$strValue);
    $strValue=mb_ereg_replace("/€/","%E2%82%AC",$strValue);
    $strValue=mb_ereg_replace("/¥/","%a5",$strValue);
    $strValue=mb_ereg_replace("/₣/","%e2%82%a3",$strValue);
}else{
    $strValue=str_replace("¢","%a2",$strValue);
    $strValue=str_replace("£","%a3",$strValue);
    $strValue=str_replace("€","%E2%82%AC",$strValue);
    $strValue=str_replace("¥","%a5",$strValue);
    $strValue=str_replace("₣","%e2%82%a3",$strValue);
}

Jixian
Reply all
Reply to author
Forward
0 new messages