Skip to main content
Inspiring
June 8, 2007
Question

Mysql and utf8

  • June 8, 2007
  • 1 reply
  • 317 views
In my mysql table I have utf8_unicode_ci as collation. In the php-file I
use "<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>". And I've added an AddCharset utf-8 for Apache.

Nevertheless, I have to use htmlentities to display the results of a
query, otherwise I get K?ln instead of Köln. Any idea?

Martin Lang
This topic has been closed for replies.

1 reply

Inspiring
June 9, 2007
I've found that piece of code which seems to work:

mysql_query("SET NAMES 'utf8'") or die(mysql_error());

Regards
Martin Lang