just recently i had a similar problem and was able to solve it with the help of php's built in utf8decode() function before saving it to the mysql.
You might look as well after mysql_real_escape_string(). Just an idea.
just recently i had a similar problem and was able to solve it with the help of php's built in utf8decode() function before saving it to the mysql.
You might look as well after mysql_real_escape_string(). Just an idea.
Thanks.
I do not use PHP here, PHP works fine with MySQL in UTF8 if I enter UTF8 data manually.
The problem is I can't import Geoname Alternatenames dump into MySQL. I get corrupted data.
I am glad you could solve the problem. If you think other GeoNames users could run into the same problem then it would be great if you could post the solution.
I am glad you could solve the problem. If you think other GeoNames users could run into the same problem then it would be great if you could post the solution.
Cheers
Marc
Sure Marc.
The problem was in MySQL settings. To make it work users should:
1. Create tables with UTF-8 character set and UTF-8 collation.
2. Set database setting to UTF-8 by this command:
ALTER DATABASE databasename charset=utf8;
3. Set MySQL settings to UTF-8 by adding these lines into MySQL configuration file (my.cnf for Linux, my.ini for Windows):