Sunday, December 23, 2018

How to change the default encoding to UTF-8 for Apache?



I am using a hosting company and it will list the files in a directory if the file index.html is not there ,it uses iso-8859-1 as the default encoding.



If the server is Apache, is there a way to set UTF-8 as the default instead?



Update: Additionally I found out that it is actually using a DOCTYPE of HTML 3.2 and then there is not charset at all... so it is not setting any encoding. But is there a way to change it to use UTF-8?


Answer



In httpd.conf add (or change if it's already there):




AddDefaultCharset utf-8

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...