ballouta Posted July 13, 2008 Share Posted July 13, 2008 Hi I have arabic text that contains diacritic signs. PHP doesn't find the word if it holds any such sign unless the user writes the signs which rarely happens. there are around 12 signs. Note that i do not want to remove these signs from my original text cuz it helps the reader to recognize the meaning. what functions i have to use to exclude these signs from the text BEING searched (stored in my DB)? Thanks You Quote Link to comment https://forums.phpfreaks.com/topic/114568-diacritic-search-problem/ Share on other sites More sharing options...
teynon Posted July 13, 2008 Share Posted July 13, 2008 Please paste code so we know how you are searching now, and what are these signs? Quote Link to comment https://forums.phpfreaks.com/topic/114568-diacritic-search-problem/#findComment-589141 Share on other sites More sharing options...
ballouta Posted July 14, 2008 Author Share Posted July 14, 2008 Hi as for search code, i think it is smthg normal you saw before <?php $kword=$_POST['search']; $query = "Select * from mag where catID ='T' AND content LIKE '%$kword%' "; $result = mysql_query($query); ?> i have no problem with the above code, BUT if the $kword will contain any such sign, the search will not find it. The signs are (I am not sure if you can see them): َ ً ُ ٌ ِ ٍ ْ ّ Thank you Quote Link to comment https://forums.phpfreaks.com/topic/114568-diacritic-search-problem/#findComment-589322 Share on other sites More sharing options...
ballouta Posted July 14, 2008 Author Share Posted July 14, 2008 any suggestions please? Quote Link to comment https://forums.phpfreaks.com/topic/114568-diacritic-search-problem/#findComment-589773 Share on other sites More sharing options...
.josh Posted July 14, 2008 Share Posted July 14, 2008 did you try some regex to remove them first and then query? Quote Link to comment https://forums.phpfreaks.com/topic/114568-diacritic-search-problem/#findComment-589774 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.