SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: unicode Error

  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question unicode Error

    This is My Doctype

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    And this is my Meta Tag

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

    But im getting this unicode character in my Website in a Place



    But when i change My Browser Setting goes off

    Help!!

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    I assume it only just happens near U+00A3, e.g. the symbols, if so it looks like a mismatch of encoding to UTF-8. You should make sure the file is also saved in: UTF-8. Declare the character encoding: http://www.w3.org/International/O-charset.en.php and this might help: http://www.w3.org/International/ques...g-declarations

  3. #3
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI,

    Can you explain me little Clearly??

    Im a beginner

  4. #4
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    If you are inputting special UTF-8 characters directly into the file, itself, it must also be 'saved' in the proper encoding format (such as UTF-8). You haven't said what program you are using - to code the page - or what human language you are writing within the page? Though you need to save it as UTF-8 not just use (the pragma directive) META element (as in post #1) in the markup.

  5. #5
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,279
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Your server also has to agree.

    There are three places where the charset is set.

    -when you save your HTML file in your text editor, as Robert said. The text editor must save the document as utf-8.
    -your meta tags (you're good there)
    -your server must send the character-encoding headers also as utf-8. If the server is telling browsers "this document is latin1" then the browsers will ignore the meta tag. The meta tag is only looked at when the server does not send out any headers at all.

    Right-click on your page in a browser and hopefully one of your options is View Page Info or similar. In there you should see a charset listed for your page.

    If you are copying and pasting letters from another document, you need to also be careful there too. I copied some Japanese into my (absolutely saved as utf-8) document, and loaded the page in my absolutely-sends-utf-8-headers server, but still saw some junk. I had to copy from a web page who was also sending out utf-8 and had used the right characters when creating the text.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •