html - japanese character is not supported in localhost -
i have project has japanese characters in it. when run project on server (the live version) japanese characters displayed. however, same files no changes in code, if run on localhost japanese characters displaying "レストラン". files includes . , i'm using google chrome. should make support japanese characters? appreciated.
add following:
<meta charset="shift-jis"/>
to file if use html5, or
<meta http-equiv="content-type" content="text/html; charset=shift-jis" />
if use html 4.01.
the reason why works on webserver because transmits http headers correct encoding. on local copy of .html
, there no such headers, browser checks <meta/>
tags (which missing), , if fails find these, guesses encoding, in case utf8. (if use webserver in localhost too, might misconfigured. in case, it's practice include charset information.)
@ashishacharya i'm pretty sure op uses shift-jis rather utf8. page rendered utf8 though.
Comments
Post a Comment