Arabic looking weird on my site

Discussion in 'HTML & Website Design' started by .:YoUnGLinKiE:., Feb 25, 2009.

  1. #1
    I've just mirrored my site's layout from left to right, but now that I finished that I'm having some problems with Arabic symbols on the site. Everything turns out in weirdness with loads of gibberish symbols even though I've set the html language to Arabic. Frontpage works fine now, but the rest of the pages don't show the Arabic.

    http://www.aragamer.com/play
     
    .:YoUnGLinKiE:., Feb 25, 2009 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Was your HTML document saved as utf-8? (without the Byte Order Mark, so don't Save As Unicode)

    Does your meta tag listing the charset state "utf-8"?

    Is the server sending the document out as utf-8?

    All three of those MUST match.

    There's also the off-chance that all three are good but you've somehow set your browser to only accept a lesser charset such as Windows 1252 or whatever that is. Most browser look at the charset sent by the server but a user can override that (dunno why they would). Most browsers will default to either checking the charset or to utf-8.
     
    Stomme poes, Feb 25, 2009 IP
  3. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #3
    hans, Feb 25, 2009 IP
  4. .:YoUnGLinKiE:.

    .:YoUnGLinKiE:. Peon

    Messages:
    1,001
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks, I just added <meta http-equiv="content-type" content="text/html; charset=utf-8" /> and it worked! ^^ Bedankt stomme poes ;)

    Yeah I should try fixing those errors, first going to clean up the layout, make sure everything's from right to left properly
     
    .:YoUnGLinKiE:., Feb 25, 2009 IP
  5. .:YoUnGLinKiE:.

    .:YoUnGLinKiE:. Peon

    Messages:
    1,001
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    .:YoUnGLinKiE:., Feb 25, 2009 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Your list is showing fine in source:
    Your meta tags for some reason have gone to decimal notation:
    Where I needed to add spacing in there to make the entities show up as you see them. Here's what a normal paste looks like:
    Which isn't bad, every browser knows how to correctly show those if it supports Unicode or decimal character entities. Even Google should get it right, if it's posting your meta description as your site text on the results page.

    In fact this is even safer than typed-in characters, in case someone's got their browser set (for whatever reason) to something other than utf-8 (overriding your page's settings) they should still get the Arabic so long as they have the font for it. Most of us do. Certainly anyone visiting your site will have those fonts and that character encoding supported.

    If you want to look up what those characters are manually (as I also use hex and decimal character entities regularly to hide emails from spambots : ) you might want to bookmark this page:
    http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
    I look at the "Unicode Point Code" number in (parentheses) and add the &#x in front and the semi-colon at the end. Otherwise I think you can type it like
    "\8482\a0" which is I think the TM trademark symbol with a nonbreakingspace after it.
     
    Stomme poes, Mar 3, 2009 IP
  7. ChaosTrivia

    ChaosTrivia Active Member

    Messages:
    2,093
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    65
    #7
    Arabic is like Hebrew, written from left to right.
    Don't forget to set sitewide css diretion:rtl and text-align:right
     
    ChaosTrivia, Mar 3, 2009 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I would hope someone who writes Arabic already knows it reads from right to left : )
     
    Stomme poes, Mar 3, 2009 IP
  9. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #9
    This escape notation expects hexadecimal values. "8482" is the decimal value for "â„¢". The hex notation would be "\2122".

    cheers,

    gary
     
    kk5st, Mar 3, 2009 IP