Welcome to WebmasterWorld Guest from 54.167.86.211

Forum Moderators: open

Message Too Old, No Replies

UTF-8 configuration for MySQL

     
10:16 pm on Jul 22, 2009 (gmt 0)

Preferred Member

5+ Year Member

joined:Mar 11, 2006
posts: 379
votes: 0


Hi, my db tables are UTF-8, but since i had problems retrieving some characters I added this piece of code to the header include of my API:

$cnn->execute('SET NAMES utf8');
$cnn->execute('SET CHARACTER SET utf8');

What should i do to the apache/php/mysql configuration in order to avoid those lines each time a user does a request?

6:03 pm on July 23, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:May 11, 2009
posts:74
votes: 0


Have you set this

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

I think this can overcome the problem