Page 1 of 1

[SOLVED] utf8/latin1 encoding problems

Posted: Sat Apr 19, 2008 5:23 am
by raptoni
Hi

I have a MySQL DB with utf8 data. My .php files are also saved as utf-8. Moreover I use the ZF which is latin as far as I know.

So here is the problem. When i use a german specific char like ü it is stored as 'ü' in the DB. I assume the string was not saved correctly as utf8. But when I print this value in my script which uses a utf8 template the data is displayed as 'ü' like it should. On the other hand string which are stored as 'ü' in the database are printed as �.

Thats normally when a file wasnt saved as utf8 but i checked all the involved files. The fact that the ZF files are Latin was never a problem.

Is there a program which checks the encoding of files?

thx

EDIT:
I used $db->query('SET NAMES utf8'); when the when I start the connection.