Originally, we ran a database with UTF-8
encoding and we had to migrate to a different server which was using latin-1
by mistake. The problem is that most names contain special foreign characters and they get rendered weird without the proper encoding:
For example:
Nezihe Şükran Akkaş
LÜTFİ ÇOBAN
Eren Karagözlü
I was able to convert it back to UTF using the following query:
SELECT convert(cast(convert(name using latin1) as binary) using UTF8) AS name FROM users;
The above names now appeared correctly:
Nezihe Şükran Akkaş
LÜTFİ ÇOBAN
Eren Karagözlü
However, all the data that was previously encoded as proper UTF-8 now appears as (NULL)
My question is how do I convert only the broken encoding rows and leave the properly encoded one's untouched? Right now, it's "either or". The problem is they are mixed in terms of order so I can't separate them by ID.
Any clue would help. Thanks!