Thursday, August 16, 2018

How to know the default charset of apache/php



When the character set is not specified either in httpd.conf, or php.ini, or .htaccess etc, then what is the default character set used by the apache server/php?



The browser considers it to be ISO-8859-1 when the response header does not include any character set information but I could not find any confirmation that the apache server/php actually sends the data with ISO-8859-1 encoding in response.



Thanks


Answer



The default value for default_charset is "iso-8859-1", which is applied to all pages served by PHP.




For Apache, the default character set for text and html is mandated by AddDefaultCharset which also has a default of "iso-8859-1".


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...