0

i am really confused with the UTF-8, displaying "Ä", "Ö", "Ü" and such.

On my page i have a form where the user can enter a message. This text is supposed to be stored in a mysql database and loaded from the database to show on the screen.

These symbols are not properly stored in the mysql database and if i manually change them in the database they are not printed properly after i fetch them. I dont understand how to get this to work.

mysql_set_charset("utf-8");Doesn't work somehow, and i probably dont know how to use it properly. Same with the encoding / decoding. Could you please enlighten me on the concept of how to properly handle those "Umlauts" and the UTF-8?

Thanks!

Dee Ell
  • 21
  • 3

1 Answers1

0

You can use this query before your actual query to set everything to utf8:

mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $conn);

Hope this will help you. :D

Yash Sodha
  • 713
  • 3
  • 13