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

utf-8 troubles

Community Beginner ,
Mar 15, 2007 Mar 15, 2007
Hi, i have a dynamic site with php/mysql. I am testing on my local machine running WAMP 1.7.0. For MYSQL, i have defined the charset to UTF-8 Unicode, collation utf8_general_ci.
In my admin section of the website I have a form to add records into the database. The page has utf-8 charset defined in the meta tag.
Now the problem - when i add text into my database (for example into a varchar field in a table) from this webpage and have a look at the data in the database through Navicat i can see that the text is broken - it does not display our Slovak characters right. Instead of the Slovak characters I get something like this ("ľšÄÃ…¥Å¾Ã½Ã¡").

What am i doing wrong? Am I supposed to set the UTF-8 also in Apache somewhere or Apache has nothing to do with it? What am I missing here?

TOPICS
Server side applications
320
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

correct answers 1 Correct answer

Community Beginner , Mar 15, 2007 Mar 15, 2007
SOLUTION: I entered these commands into mysql console:

SET CHARACTER SET UTF8
SET character_set_client = utf8;
SET character_set_results = utf8;
SET character_set_connection = utf8;
SET NAMES = 'utf8';

Everything works just fine since then.
Translate
Community Beginner ,
Mar 15, 2007 Mar 15, 2007
LATEST
SOLUTION: I entered these commands into mysql console:

SET CHARACTER SET UTF8
SET character_set_client = utf8;
SET character_set_results = utf8;
SET character_set_connection = utf8;
SET NAMES = 'utf8';

Everything works just fine since then.
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