1.4.0:search function does not work with chinese characters
Moderator: Thorsten
1.4.0:search function does not work with chinese characters
Hello Thorsten
it seems that the search function can not find any matching records is the keywords input are in chinese characters.
could you please check this out?
best regards.
netz
it seems that the search function can not find any matching records is the keywords input are in chinese characters.
could you please check this out?
best regards.
netz
Hi,
yes, I know this issue. You'll have to use MySQL 4.1.x to use with Chinese characters. Sorry!
bye
Thorsten
yes, I know this issue. You'll have to use MySQL 4.1.x to use with Chinese characters. Sorry!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
maybe there is a chance for a hack. Which version of phpMyFAQ do you use?
bye
Thorsten
maybe there is a chance for a hack. Which version of phpMyFAQ do you use?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
and which version of phpMyFAQ do you use?
bye
Thorsten
and which version of phpMyFAQ do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
okay, the last info I need: MySQL Server and MySQL client version.
bye
Thorsten
okay, the last info I need: MySQL Server and MySQL client version.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Hi,
is it possible to upgrade your database to MySQL 4.1.2? This version supports unicode characters.
bye
Thorsten
is it possible to upgrade your database to MySQL 4.1.2? This version supports unicode characters.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
hi, thorsten,
i am afraid that 's hard.
I noticed that the old version of phpmyfaq works with chinese chars, so
I want to modify the search function by myself, could you please give me some advise how to do that?
i really dont want to give up phpmyfaq because of lower version of mysql.
i found out there seems two solution to this:
A: add binary when declare the key word variable:
key_word_to_search char(10)binary
B: USING Locate function of mysql:
SELECT * FROM table WHERE locate(field,'chinese_string') > 0;
i am afraid that 's hard.
I noticed that the old version of phpmyfaq works with chinese chars, so
I want to modify the search function by myself, could you please give me some advise how to do that?
i really dont want to give up phpmyfaq because of lower version of mysql.
i found out there seems two solution to this:
A: add binary when declare the key word variable:
key_word_to_search char(10)binary
B: USING Locate function of mysql:
SELECT * FROM table WHERE locate(field,'chinese_string') > 0;
Last edited by ipig on Fri Jul 02, 2004 9:51 am, edited 2 times in total.
Hi,
hm, which version of phpMyFAQ worked with chinese characters?
bye
Thorsten
hm, which version of phpMyFAQ worked with chinese characters?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
hi, Thorsten,
as far as i know, from php 3.x it can work with chinese chars.
i try to google , then found out the following solutions, and i decide to modify the search function , which solution do you think is better?
A: add binary when declare the key word variable:
key_word_to_search char(10)binary
B: USING Locate function of mysql:
SELECT * FROM table WHERE locate(field,'chinese_string') > 0;
best regards.
as far as i know, from php 3.x it can work with chinese chars.
i try to google , then found out the following solutions, and i decide to modify the search function , which solution do you think is better?
A: add binary when declare the key word variable:
key_word_to_search char(10)binary
B: USING Locate function of mysql:
SELECT * FROM table WHERE locate(field,'chinese_string') > 0;
best regards.
Hi,
the second version should work. What you can test is changing the line 693 in inc/functions.php from
to
bye
Thorsten
the second version should work. What you can test is changing the line 693 in inc/functions.php from
Code: Select all
$begriff = safeSQL(trim($begriff));
Code: Select all
$begriff = trim($begriff);
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 3
- Joined: Thu Jul 01, 2004 5:06 pm
Hi,Thorsten,
finally it works
i changed the $query string from
$query = "SELECT id, lang, rubrik, thema, content FROM ".SQLPREFIX."faqdata WHERE MATCH (thema,content,keywords) AGAINST ('".$begriff."') AND active = 'yes'";
to
$query = "SELECT id, lang, rubrik, thema, content FROM ".SQLPREFIX."faqdata WHERE ( locate('".$begriff."',thema) or locate('".$begriff."',content) or LOCATE('".$begriff."',keywords) ) AND active = 'yes'";
in the searchEngine funcion of file functions.php under inc folder.
it's great!
thanks for your help.
have a nice day.
finally it works

i changed the $query string from
$query = "SELECT id, lang, rubrik, thema, content FROM ".SQLPREFIX."faqdata WHERE MATCH (thema,content,keywords) AGAINST ('".$begriff."') AND active = 'yes'";
to
$query = "SELECT id, lang, rubrik, thema, content FROM ".SQLPREFIX."faqdata WHERE ( locate('".$begriff."',thema) or locate('".$begriff."',content) or LOCATE('".$begriff."',keywords) ) AND active = 'yes'";
in the searchEngine funcion of file functions.php under inc folder.
it's great!
thanks for your help.
have a nice day.