简体   繁体   中英

Special characters display as garbage in Chrome

I recently started using Chrome for web development (previously I used FireFox) and I've run into an issue.

If I submit the special character via POST and then in PHP do die($_POST['thatvar']); , then FireFox shows the symbol on the page (and in FireBug), but Chrome shows Ω on the page (though it shows in the dev. tools).

Why is this happening?

use charset in the head

by adding

 <meta http-equiv="content-type" content="text/html;  charset=utf-8" />

in your head

like :

<head>
 <meta http-equiv="content-type" content="text/html;  charset=utf-8" />
</head>

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