Special characters not supported (html)?

wwl777

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?
 
This will be related to your character encoding...

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

Code:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 
I already thought it had something to do with the character encoding. I'm using html5 and had this in my <head>

Code:
<meta charset="utf-8">

I also tried your code, but it still displays as
 
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]
 
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).
 
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.
 
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']);

Fixed!!
 
ah ! beat me too it.... just typing up checking the db charset and collation.

Glad you fixed it.
 
Back
Top