Just created webapp shows in ISO-8859-15 instead ..

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-8)

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.

Thanks for answer. I’m new to configuration of Apache or PHP but will search how to set these headers. Thanks again.

Regards

Jacek

It’s the HTTP content header, look up the header() function in the PHP manual.

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

Thanks for last link … it helped. I just add "AddDefaultCharset UTF-8" to Virtual host configuration and viola … UTF-8 shows…

Regards

Jacek