resor
(Resor)
November 8, 2011, 3:19pm
1
Hello,
I have problem with charset on my Yii webapp.
My out-of-box(without database connection) webapp shows in FF a charset encoding is ISO-8859-15 instead of UTF-8 in page properties(right click on page -> show page properties).(meta tag Content-Type is set to utf-
I have apache2 installed on Ubuntu machine with yii 1.1.8.
I don’t believe that Yii framework generates some files in other than UTF-8 encoding, but something is not good.
Anyone have idea what it could be … i suppose maybe some apache2 misconfiguration ??
Regards
Jacek
l.jurgs
(L Jurgs)
November 8, 2011, 10:45pm
2
ResoR:
Hello,
I have problem with charset on my Yii webapp.
My out-of-box(without database connection) webapp shows in FF a charset encoding is ISO-8859-15 instead of UTF-8 in page properties(right click on page -> show page properties).(meta tag Content-Type is set to utf-
I have apache2 installed on Ubuntu machine with yii 1.1.8.
I don’t believe that Yii framework generates some files in other than UTF-8 encoding, but something is not good.
Anyone have idea what it could be … i suppose maybe some apache2 misconfiguration ??
Regards
Jacek
A meta tag isn’t enough, you need to set the headers to utf-8. PHP doesn’t default to utf-8.
resor
(Resor)
November 8, 2011, 10:56pm
3
Thanks for answer. I’m new to configuration of Apache or PHP but will search how to set these headers. Thanks again.
Regards
Jacek
l.jurgs
(L Jurgs)
November 8, 2011, 11:10pm
4
It’s the HTTP content header, look up the header() function in the PHP manual.
mikl
(Mike)
November 9, 2011, 8:05am
5
You can set AddDefaultCharset UTF-8 in your Apache vhost config. Also read this:
http://www.yiiframework.com/wiki/16/how-to-set-up-unicode
resor
(Resor)
November 9, 2011, 8:23am
6
Thanks for last link … it helped. I just add "AddDefaultCharset UTF-8" to Virtual host configuration and viola … UTF-8 shows…
Regards
Jacek