Reputation: 29
I have a database full of encoding errors, and am at a loss trying to reverse to find the original data.
This is a sample address from Turkey.
M�¼ze M�¼d�¼rl�¼�Ÿ�¼
Konyalt�± Cad.
Muratpa�Ÿa
Antalya
Update
The problem was two-fold.
latin1_swedish_ci
tables. i.e. characters falling outside of the charset.A solution for the latter appears to be:
$str = str_replace('?', chr(194).chr(131), $str);
$str = utf8_decode(utf8_decode($str));
This does not solve the original corruption problem, that encoding information has been lost as suggested by @cleong
Upvotes: 2
Views: 1000
Reputation: 12826
I assume your database is MySQL. Did you update the encoding and try? First check if you can get it to show up inside MySQL correctly. Set the encoding/collation to UTF-8, query using phpmyadmin or MySQL CLI and check how it looks.
Upvotes: 2