Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Mysql and utf8

LEGEND ,
Jun 08, 2007 Jun 08, 2007
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
TOPICS
Server side applications
317
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 09, 2007 Jun 09, 2007
LATEST
I've found that piece of code which seems to work:

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

Regards
Martin Lang
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines