Re: Displaying unicode in browser

From: Otto Stolz (
Date: Tue May 06 2003 - 09:13:33 EDT

  • Next message: Theodore H. Smith: "Re: Finite state machines? UTF8: toFold(), normalisation, etc"

    SRIDHARAN Aravind wrote:

    > e.g, For , the unicode equivalent is \u00e1.
    > And when I display this character on browser what I get is \u00e1

    > instead of .

    - You have to use one of the HTML forms rather than a Java surrogate.
       Some of these were pointed out by others, I'd like to give th full

       Chose from the following options:
        Encode the character in a suitable transfer encoding ("charset",
         in HTTP lingo). For your example, ISO 8859-1 is suitable (as for
         all characters from U+0000 through U+00FF), cf.
         UTF-8 is suitable for all Unicode characters, cf.
        Use a character entity, e. g. "&aacute;" (case sensitive), cf.
        Use a Numeric character Reference (NCR),
         cf. <>.
         These come in two flavours:
         - decimal, e. g. "&#225;",
         - hexadecadic, e. g. "&#xe1;" (case insensitive).

    - You have to tell the browser about the encoding you are using,
       cf. <>.

    Examples for these techiques can be found at:
    - <>
    - <>
    - <>
    - <>
    - <>
    (For the latter two, you need a CJK font to display all characters).
    Look also at the HTML source of these examples.

    - Note that Netscape 4.7 (and earlier versions) does display both
       character entities and NCRs only if these characters could also
       be encoded in the transfer encoding (charset) used. To be on the
       safe side, you can declare UTF-8 encoding, and type your whole
       HTML source in ASCII, using entities/NCRs for all non-ASCII

    Best wishes,
       Otto Stolz

    This archive was generated by hypermail 2.1.5 : Tue May 06 2003 - 10:06:25 EDT