-2

I made the mistake in generating my tables with the standard collation. After switching to utf8 german letters are not displayed correctly.

I already made followging steps with no effect:

In Header:

meta http-equiv="Content-Type" content="text/html;charset=utf-8"

After mysqli_connect:

mysql_set_charset('utf8', $con);

I changed all tables/fields to UTF8_unicode_ci.

What else should i do, to make this work? Really appreciate your help! Thanks in advance.

EDIT: ok i got it:

Instead of:

mysqli_set_charset('utf8', $con); 

i have to use:

mysqli_set_charset($con, 'utf8');

1 Answers1

1

When you are selecting or inserting data from or into database execute this query before every thing.

$query = "SET NAMES UTF8";
웃웃웃웃웃
  • 11,829
  • 15
  • 59
  • 91
Amir Habibzadeh
  • 437
  • 2
  • 11