receiver Posted July 29, 2011 Share Posted July 29, 2011 Hi, i really surfed a lot to find a solution but didn't find anything that could help me. I need to search multibyte characters and all others(chinese russian etc). this only matches english words but doesn't match multibyte characters even if they in utf-8 tabel or in latin1 swedisch ci I can retrive(insert to db and retrive with no problems) multibyte characters to show with no problems but search doesn't work : MATCH(s.keyword,s.desc,s.title,s.url,u.usern) AGAINST('$q' IN BOOLEAN MODE ) - just does not match! inside a latin1 table they look like this "кÑперт кÑперÑ" but show on php allright. in table utf-8 they look clean like this: 'Эксперт'. but still cant retrive them i mean search using boolean mode or any other mode. anyone can help me with this , ? Quote Link to comment https://forums.phpfreaks.com/topic/243146-match-multibyte-characters-in-boolean-mode/ Share on other sites More sharing options...
Ninjakreborn Posted July 29, 2011 Share Posted July 29, 2011 Read through this: http://www.linuxquestions.org/questions/programming-9/mysql-and-php-multibyte-character-support-311060/ Quote Link to comment https://forums.phpfreaks.com/topic/243146-match-multibyte-characters-in-boolean-mode/#findComment-1248863 Share on other sites More sharing options...
receiver Posted July 29, 2011 Author Share Posted July 29, 2011 Anyways, thank you! for the reply, but I can retrieve data from db that are multibyte characters example like "select from where sometable='Эксперт ксперт'" etc. This should mean that characters are supported? right, but cant use in "match against". this does notwork: MATCH(s.title) AGAINST('$q' IN BOOLEAN MODE ) (cant find any results at all ) this works: where s.title='$q' my php ini: ;mbstring.language = Japanese ;mbstring.internal_encoding = EUC-JP ;mbstring.http_input = auto ;mbstring.http_output = SJIS ;mbstring.encoding_translation = Off ;mbstring.detect_order = auto ;mbstring.substitute_character = none; ;mbstring.func_overload = 0 any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/243146-match-multibyte-characters-in-boolean-mode/#findComment-1248955 Share on other sites More sharing options...
receiver Posted July 29, 2011 Author Share Posted July 29, 2011 tried this: s.title like '%$q%' this works but why isn't the boolean mode working? Quote Link to comment https://forums.phpfreaks.com/topic/243146-match-multibyte-characters-in-boolean-mode/#findComment-1248972 Share on other sites More sharing options...
Pikachu2000 Posted July 29, 2011 Share Posted July 29, 2011 See if any of these restrictions apply: http://dev.mysql.com/doc/refman/5.5/en/fulltext-restrictions.html Quote Link to comment https://forums.phpfreaks.com/topic/243146-match-multibyte-characters-in-boolean-mode/#findComment-1249040 Share on other sites More sharing options...
receiver Posted July 29, 2011 Author Share Posted July 29, 2011 See if any of these restrictions apply: http://dev.mysql.com/doc/refman/5.5/en/fulltext-restrictions.html Thank you for your reply! I could not understand what does the workaround options mean. Can't see any workaround? just explanes the search relevance theory. Yes my tabels are MyISAM, MySQL charset: UTF-8 Unicode (utf8). tabel is full text index, even tryed without boolean mode and worked for regular eng characters. in "match agains" mode can not see the multibyte characters at all or why doesn't it return any results. if I search this text "Эксперт Эксперт ксперт legos mangé manager" it appears in case: legos or mangé or mangésomerandom or manager not in case Эксперт Эксперт ксперт, ( about the third word (mangésomerandom- no word like that) makes the character é look more like some placeholder or space, anyways does not return results in case "mang"). I tried adding "" to search but nothing. Only way I can think right now is to use like method separately for multibyte searches. anyone can suspect anything? what could be the problem. Quote Link to comment https://forums.phpfreaks.com/topic/243146-match-multibyte-characters-in-boolean-mode/#findComment-1249075 Share on other sites More sharing options...
receiver Posted July 29, 2011 Author Share Posted July 29, 2011 I started getting some result by searching Arabic and different texts in Russian. Dont know why my first Russian text didn't appear. other languages don't act like English in search, probably I don't know the languages no enough, anyways let see what happens. Some like Armenian still don't show nothing. Quote Link to comment https://forums.phpfreaks.com/topic/243146-match-multibyte-characters-in-boolean-mode/#findComment-1249109 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.