dimanche 19 juin 2016

How to convert one unicode char to second looking exactly the same?

I will try to explain my problem. I am working with Czech special letters in MySQL database, such as ěščřžýáíé, etc. I was having problem when searching in database, because I was searching for exactly the word, which I knew was in the database, but no results were found.

Later I discovered, that somehow I have two "versions" of characters, which look exactly the same, but they are different in Unicode. Please take a look at example here. Both "" and "á" look the same and should be treated as the same. So now I need a way how to convert one to other. Preferably using MySQL or PHP.

enter image description here

As you can see on above picture, the first character is actually made of two characters "a" and "´". The second characters is just "á" as single character and that is what I would like to convert the first one to.

Any ideas how to handle this ? Of course, I am talking about all the Czech characters, not only "á", I used it only for example.

Aucun commentaire:

Enregistrer un commentaire