Character Encoding Problem!

Discussion in 'HTML & Website Design' started by amitash, Dec 17, 2009.

  1. #1
    In my site, i get so many of � signs and other illegal characters. How to remove them. Please Help!
     
    amitash, Dec 17, 2009 IP
  2. Piggy

    Piggy Active Member

    Messages:
    574
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    70
    #2
    You need to add this to the very first of your index.
    
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    	  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    Code (markup):
    The UTF is probably what you don't have.
     
    Piggy, Dec 17, 2009 IP
  3. amitash

    amitash Well-Known Member

    Messages:
    399
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    125
    #3
    Its already there
     
    amitash, Dec 17, 2009 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    1) DON'T use the XML prolog, that throws IE into quirks mode. the DOCTYPE by itself should be all you need.

    2) You SHOULD be using a character encoding meta:

    
    <meta
    	http-equiv="Content-Type"
    	content="text/html; charset=utf-8"
    />
    
    Code (markup):
    You will likely have to edit the document, what did you use for an editor? Does the editor support UTF-8? did you cut and paste from a windblows editor like Word? That's Windows-1252 and not compatible with EITHER UTF-8 or ISO-8859-1.

    There's a reason that if it's a English language site I just say ISO-8859-1 and then restrict myself to 7 bit ASCII and entities.

    Oh yeah, I see it in the footer of the page in your siggy - You are saying UTF-8, but the document is not ENCODED UTF-8 - in fact, I'm not even certain what characters you are trying to use or what encoding that is (doesn't look like Win-1252 or ISO-8859-1) - I'd delete the offending characters and put them in restricting yourself as I said, to 7 bit ascii and latin-1/latin-symbol entities.
     
    deathshadow, Dec 17, 2009 IP
  5. amitash

    amitash Well-Known Member

    Messages:
    399
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    125
    #5
    it doesnt work either
     
    amitash, Dec 17, 2009 IP
  6. amitash

    amitash Well-Known Member

    Messages:
    399
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    125
    #6
    Thanks to Death Shadow, it works now. Sorry for the Bump.
     
    amitash, Dec 17, 2009 IP