Saturday, August 3, 2019

php - How to force UTF-8 encoding in browser?



I have page which encoding is declared with







But when I enter the page another encoding (ISO) is chosen in browser. I have tried to set encoding by PHP method



header('Content-type: text/html; charset=utf-8');


But it also didn't help. All source files are encoded in UTF-8 without BOM. The only solution which I tried and it had worked was setting encoding in .htaccess file by adding AddDefaultCharset UTF-8 line, but then another pages on the server were not displayed correctly. How can I solve this problem?



Answer



Disable default charset:



AddDefaultCharset Off

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