1

I am learning yii2, I have issue for display utf8 in page main.php this is error.

LO?I S?N PH?M

I have used

header('Content-Type: text/html; charset=utf-8');

but issue is not solved

Please help me fix it.

Thank you so much

Jonnny
  • 4,939
  • 11
  • 63
  • 93
Võ Minh Tâm
  • 59
  • 2
  • 9
  • Does this help at all http://stackoverflow.com/questions/10988123/error-with-utf8-characters-and-htmlspecialchars-in-yii – Jonnny Dec 29 '15 at 17:18
  • I've read it, but my php file more UTF8 string. I do not use utf8_endcode for each string. I want to make one for all strings – Võ Minh Tâm Dec 30 '15 at 02:47

1 Answers1

0

I struggled a long time with the same problem. In my case I used Eclipse for php, and the encoding parameter for all my files was different from utf-8. I had to change the properties of my environment so my code files themselves where utf-8!

loggheci
  • 1
  • 2