Re: DOM CreateTextNode with Unicode

Discussion in 'XML' started by Martin Honnen, Feb 29, 2008.

  1. RC wrote:

    > var chineseChar = "鼠";


    Use JavaScript escape mechanism \uHHHH
    var chineseChar = "\u9f20";

    Or simply write your JavaScript files in an editor that supports Unicode
    and encode the files as UTF-8, that way you can use the character
    literally. You only need to make sure the SVG user agent knows the
    encoding, either by making sure the server indicates it in a HTTP header
    or by giving the encoding in an attribute of the script element
    <script xlink:href="script.js"
    type="text/javascript; charset=UTF-8"></script>

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Feb 29, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Avi U
    Replies:
    2
    Views:
    595
    Martin Honnen
    Jan 13, 2004
  2. Danny
    Replies:
    11
    Views:
    868
  3. Thomas 'PointedEars' Lahn

    Re: DOM CreateTextNode with Unicode

    Thomas 'PointedEars' Lahn, Mar 1, 2008, in forum: XML
    Replies:
    0
    Views:
    510
    Thomas 'PointedEars' Lahn
    Mar 1, 2008
  4. DKM
    Replies:
    10
    Views:
    214
  5. Jeff

    newbie: createTextNode & Div

    Jeff, Nov 15, 2005, in forum: Javascript
    Replies:
    2
    Views:
    97
    web.dev
    Nov 15, 2005
Loading...

Share This Page