From: Zheng Zhu Date: Mon, 29 Nov 2004 02:14:54 +0000 (+0000) Subject: correct parsing of info line for CONV ALL query X-Git-Tag: 1.5.0alpha1~1202 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=542f1705ba1355cad5192abfa5c5a5c4ee307a78;p=lhc%2Fweb%2Fwiklou.git correct parsing of info line for CONV ALL query --- diff --git a/includes/ZhClient.php b/includes/ZhClient.php index 3982ca6220..e07908db9d 100644 --- a/includes/ZhClient.php +++ b/includes/ZhClient.php @@ -110,9 +110,11 @@ class ZhClient { $info = explode(";", $infoline); $ret = array(); $i=0; - foreach($info as $code => $len) { + foreach($info as $variant) { + list($code, $len) = explode(' ', $variant); $ret[strtolower($code)] = substr($data, $i, $len); - $i+=$len+1; + $r = $ret[strtolower($code)]; + $i+=$len; } return $ret; } @@ -250,7 +252,7 @@ class ZhClientFake { * @access public */ function segment($text) { - /* adapted from LanguageZh_cn.stripForSearch() + /* adapted from LanguageZh_cn::stripForSearch() here we will first separate the single characters, and let the caller conver it to hex */