• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Special characters not supported (html)?


Junior Member
I noticed that on one of my sites characters like é or » show up fine without using their html entity (é and »). On the other site it has no idea what they are and displays a question mark:

Why is this?


Active Member
This will be related to your character encoding...

place this in the head of your document, should sort it out.

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


Junior Member
I already thought it had something to do with the character encoding. I'm using html5 and had this in my <head>

<meta charset="utf-8">
I also tried your code, but it still displays as


Junior Member
My loyal helpers, sunburn and Harry :D
It displays fine in my editor (notepad++), but not on the locally hosted website (using xampp). [For example Dé on the one site is displayed as D� on the other]


Senior Member
In Notepad++ I have this problem sometimes (usually when using content:""; in CSS). Head to Encoding --> UTF-8. See if that does anything (provided it's not DB content).


Junior Member
Yeah, it does pull the info/text out of a database. I've just put the site online and the problem remains.

The same database on another site shows the characters like it should.

@Harry, it was indeed set another encoding (ANSI). Setting and saving it into utf-8 didn't change anything though.


Junior Member
Good suggestion about that it is pulled from the database. Even if I encode my php page as utf-8, if it pulls stuff from the database it means those strings are written to the database in iso-8859-1 format. I changed my code to convert it to utf8::

$text= utf8_encode($row['text']);