简体   繁体   中英

how show persian characters in alert box?

i have set utf-8 as my encoding both in html and my php header and everything is ok when i run on localhost but when i upload my file on my host everything is ok but alert and confirm box that opens by javascript, they are encode by unicode like \悥 i don't know what should i do i have tried these: header('Content-Type: text/html; charset=utf-8'); and also


i have tried this and seems to work fine

<script type="text/javascript" charset="utf-8">

alert("\ت\س\ت \ف\ا\ر\س\ی");

确保这在您的apache配置中:

AddCharset utf-8 .js

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