简体   繁体   中英

Apache ignores meta charset on HTML display in browser

I have problem with meta charset encoding. I have a Zend App which inserts the meta charset into phtml file this way:

$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8');
$this->headMeta();

In browser, the page has set the us-ascii charset. I don't know why it's happening. Apache and PHP conf files have set charset with UTF-8 encoding.
My local server is set on Linux Mint (on VirtualBox in Windows 7). File encoding conversion doesn't change anything.

===============
The problem occured because of php5-tidy Apache module.

Take look here: How to set charset to UTF-8 in a Zend application? .Make sure your working files are saved with utf-8 encoding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM