[Vtigercrm-developers] Need help for searching double byte character in VtigerCRM 5

顾彤 gutong at shine-it.net
Fri Sep 29 01:30:26 PDT 2006


Hi team,

We  have done most part of the Simplified Chinese translation for 5.0GA, 
yet we have been encountering  insurmountable problems of doulble-byte 
character support in the system. The main problem is that the current 
global search engine doesn't work for double-byte characters. We have 
done our code hacking as following to allow the Chinese characters to be 
passed to the query variable.
Modified the UnifiedSearch.php around line 45,
From:
if(isset($_REQUEST['query_string']) && preg_match("/[\w]/", 
$_REQUEST['query_string'])) {
To:
if(isset($_REQUEST['query_string']) && 
preg_match('/[^'.chr(0xa1)."-".chr(0xff).']+/',$_REQUEST['query_string'])) {

It seems that  the regex pattern matched the Chinese characters and the 
$search_val received the query string, however, the result was not returned.

Please kindly advise us how to resolve the said problem, thank you.

Also, the Chinese characters are not showing normally for all the Ajax 
related parts.

Cheers,

Tony

 




More information about the vtigercrm-developers mailing list