SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot amri's Avatar
    Join Date
    Dec 2002
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Displaying foreign characters

    Hello all,
    I want to know how to display foreign characters such as Chinese, Japanese or Arabic in HTML page.
    Thank you very much

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That depends on your server encoding really. If it's UTF8 you should be fairly ok. I haven't really seen an issue, and sites like mixi inline it:

    HTML Code:
    <title>ソーシャル・ネットワーキングサイト [mixi(ミクシィ)]</title>

  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)
    It can depends on the fonts installed on the users system but the encoding is a major factor.

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can either use an encoding that allows you to have the literal characters in your document (like UTF-8), or you can use numeric character references (&#38;#xxxxx;).

    You also need to specify one or more font families that include glyphs for those characters (using CSS).

    Your visitors must have at least one of those fonts installed in order to actually see anything useful.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Zealot amri's Avatar
    Join Date
    Dec 2002
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chris_fuel
    That depends on your server encoding really. If it's UTF8 you should be fairly ok. I haven't really seen an issue, and sites like mixi inline it:

    HTML Code:
    <title>ソーシャル・ネットワーキングサイト [mixi(ミクシィ)]</title>
    How do I find out my server encoding?
    Thanks

  6. #6
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

  7. #7
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's not the server encoding; that's something that is used if the server doesn't send an encoding.

    Browsers like Opera and Firefox can show you which encoding the server sends (although Firefox may just display the encoding it has chosen by default, but I think there's some extension or other that shows the real encoding).

    You can usually control which encoding is sent by the server, either by changing its configuration or by using a server-side programming language to send the headers.
    Birnam wood is come to Dunsinane


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
  •