Question

Is there any restrictions for it to show normally?

Was it helpful?

Solution

Sounds like an encoding problem. For special characters like that, I prefer to use HTML entities. In this case, try »

OTHER TIPS

After my experience, a question mark usually replaces undecodable special characters when you encode your special characters with utf8, because web browsers by default decode the web page using iso-latin1. You can/should explicitely declare the encoding of your web page using the following directive:

<?xml version="1.0" encoding="UTF-8" ?>

for xhtml, or

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

(inside the element), for HTML.

Regard this post as a supplement, because I guess that using the xml/html entities like &raquo; or &#187; mentioned above are the better way to go.

You can also use &#187;

If your Apache server is configured with...

AddDefaultCharset UTF-8

...in the httpd.conf file (which, strangely, was the default on my server), then Content-Type specs in the .html files (e.g., <meta http-equiv=Content-Type content="text/html; charset=windows-1252">) will be ignored, causing character codes above 127 to be interpreted incorrectly.

Comment out the AddDefaultCharset line and restart Apache.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top