Re: Default charset
| From: | Rasmus Lerdorf | Date: | Wed, 04 Jan 2006 10:40:37 +0000 |
| Subject: | Re: Default charset | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21399@lists.php.net to get a copy of this message | ||
Not really a question for internals.
header("Content-type: text/html; charset=UTF-8");
from your application will do the trick.
-Rasmus
Graziano Liberati wrote:
Hi, I wrote the same mail some days ago in the general list and I asked also on the #php IRC channel on Freenode but I didn't find any answer, so I try here. I need to set the default charset for my application to UTF-8 instead of the default one of the webserver that is ISO-8859-1. I've tried to change the value of default_charset in php.ini and all it's ok, but I need to set the value only for one application so I've tried to use the ini_set function in this way: ini_set('default_charset','utf-8'); The problem is that that the ini_set function seems to be ignored, I don't have the same effect of changing the php.ini configuration file, with the ini_set function the default charset of the output is still ISO-8859-1. My system: PHP 5.0.5, Apache 2.0.54. Someone can help me? Regards.