SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist Pixelateur's Avatar
    Join Date
    Feb 2006
    Location
    Hamburg, Germany
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Boxes instead of arabic characters

    Hello everybody,

    my client just told me that he sees only "boxes" instead of arabic characters when viewing our new site in "the latest version of Internet Explorer". I am unable to reproduce this error, however. Can anybody suggest a reason for this or tell me how to fix it?

    Thanks a lot for any feedback.

  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)
    As it looks as though it is in UTF-8; is it possible that they don't have the correct fonts/language pack installed on their system or have their browser not using the correct encoding.

    You are using text going from right to left in UTF-8, but still it should work. Arabic encoding (ISO-8859-06) maybe try that on a very simple RTL demo page with plain ASCII text and ask them if that cures things.

  3. #3
    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)
    Also forgot to mention you should have:

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ar" lang="ar">

    Better still this might help; http://www.w3.org/International/tutorials/bidi-xhtml/ I'd be interested in which solution you find works though.

  4. #4
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,117
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    It should also be said that it's how the pages are served that defines character encoding. It's the data that is sent with the request and headers that are sent that need to be in UTF-8.
    http://www.w3.org/International/tuto...rial-char-enc/

    Looking at the content-type header in the Response headers it doesn't look like this is how they pages are being served.
    Content-Type: text/html
    Not
    Content-Type: text/html; charset=utf-8

    Because you are using PHP try adding this to the top of the page.
    Code:
    <?php
       header('Content-Type: text/html; charset=utf-8'); 
    ?>
    and see if that fixes it.

    Hope it helps

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    I checked the site in Opera (using the Info tab on the left) and it suggests that the page is being serves as utf-8 by the server.

    Sometimes if I copy text from a text editor that is not encoded as utf-8 the characters don't display properly, even if the page is served as utf-8 (I was helped recently with this issue here: http://www.sitepoint.com/forums/showthread.php?t=648930). Don't know if this is your situation, though.

  6. #6
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,117
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hmm, Not 100&#37; sure but I think the page info in browsers would show the computed encoding - that would take into account content-type headers, meta and the characters themselves.

    I was using the web developer toolbar's Information > Response Headers as the source of truth.

    Most probably the user who is having trouble is using IE6, where it needs to be told explicitly a few times

  7. #7
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the issue only with IE8? Since he's getting boxes, and if the problem is with all browsers, it is likely he does not have Arabic fonts on his machine. If it IE only, and if the browser is configured to something other than utf-8, he should still be getting printable characters; just not the right characters. Without more trouble shooting on his machine it's all guesswork.

    On a side note, the Arabic font has such a low aspect ration (en height em height), it is very hard on the eyes. I'd suggest going at least 50% larger.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    Hmm, Not 100% sure but I think the page info in browsers would show the computed encoding - that would take into account content-type headers, meta and the characters themselves.
    I was going on Tommy Olsson's comment in the post I linked to above:

    Opera's Info panel will also show you the encoding sent by the server for any page.
    I was using the web developer toolbar's Information > Response Headers as the source of truth.
    Interesting. I'll try that too.


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
  •