[SOLVED] utf8/latin1 encoding problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
raptoni
Forum Newbie
Posts: 4
Joined: Tue Jan 29, 2008 11:11 am

[SOLVED] utf8/latin1 encoding problems

Post 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.
Post Reply