Welcome to WebmasterWorld Guest from 22.214.171.124
We have a database in MySQL that contains data with accentuated characters (Brazilian Portuguese). The scripts system is in PHP.
When it is made a search in this database, the system seeks and it returns records from the database that match exactly the characters, as they were typed. For instance: if the user types in the search field "São José" (accented), the system doesn't find records that contains "Sao Jose" (without accents). Still, if the search is made by "Sao Jose" (without accents), the system doesn't find records that contains "São José" (accented).
Does some way exist that PHP/MySQL returns all of the occurrences in function of the characters, ignoring its accentuation, in other words, independently if the characters in the database OR search field are or not accentuated?
Thank you very much
Valter - Brazil
I think your main problem here is data integrity. The two phrases aren't the same from an ascii point of view. I would suggest streamlining the data when it is inserted into the db. Either, removing all accents or making sure they are all there(which is alot of work). We did have a discussion about removing special chars that might help.
Removing umlauts from PHP [webmasterworld.com]
someone else may know a better solution though.