UTF8 text encoding and php with mysql
Posted: Tue Feb 16, 2010 3:51 am
Hi,
I have an annoying problem when migrating data from a database to another. The data in the original database is all encoded as Latin1 and the collation on the db and all the tables and text fields is Latin1 throughout. However when you view the data on the website that is connected to it it displays as UTF8 ie it has characters such as řčšěáí etc.
When I check the tables using phpmyadmin, the data does nost display correctly, I am guessing that the data is being converted from Latin1 to UTF8 by the php code in the website backend, does anyone know how this is done?
I have an annoying problem when migrating data from a database to another. The data in the original database is all encoded as Latin1 and the collation on the db and all the tables and text fields is Latin1 throughout. However when you view the data on the website that is connected to it it displays as UTF8 ie it has characters such as řčšěáí etc.
When I check the tables using phpmyadmin, the data does nost display correctly, I am guessing that the data is being converted from Latin1 to UTF8 by the php code in the website backend, does anyone know how this is done?