3
4

1 回答 1

3

You are probably not using the Ascii apostrophe (') but some non-Ascii punctuation mark, such as the correct punctuation apostrophe (’). The problem arises because your HTML document is (probably) UTF-8 encoded but the browser interprets it as windows-1252 encoded. If there encoding is not declared in HTTP headers, adding the tag <meta charset=utf-8> into the head part would help. For general advice on encodings, see the W3C page Character encodings.

The textarea element is meant for user input. For presenting your content, other elements (possibly styled with CSS) are usually a better choice. However, the encoding issue is the same.

于 2012-11-20T07:35:27.817 回答