4
4

5 回答 5

2

You should save your HTML source as UTF8.

Alternatively, you can use HTML entities instead.

于 2012-04-09T02:51:34.503 回答
1

The source code needs to be saved in the same encoding as you're instructing the browser to parse it in. If you're saving your files in UTF-8, instruct the browser to parse it as UTF-8 by setting an appropriate HTTP header or HTML meta tag (headers preferable, your web server may be setting one without you knowing). Use a decent editor that clearly tells you what encoding you're saving the file as. If it doesn't display correctly, there's a discrepancy between what you're telling your browser the file is encoded in and what it's really encoded in.

于 2012-04-09T03:05:08.320 回答
0

Check to see if Apache is setup to send the charset. Look for the directive "AddDefaultCharset" and set it to Off in .htaccess or your config file.

Most/all browsers will take what is sent in the HTTP headers over what is in the document.

于 2012-04-09T02:52:14.363 回答
0

If you're using Notepad++, I suggest You to use Edit Plus editor to copy the text (which has the special characters) and paste it in your file. This should work.

于 2016-04-19T13:25:43.483 回答
-2

Yes I had this problem too in notepad++ copy and pasting wasn't working with some symbols

I think SLaks is right

HTML entities for copyright symbol &#169

于 2012-04-09T03:02:33.843 回答