www.webdeveloper.com
Results 1 to 4 of 4

Thread: easy way to write non english chars?

  1. #1
    Join Date
    Aug 2011
    Posts
    3

    easy way to write non english chars?

    Hi all,
    I'm kind of new to js, I wanted to write some non english chars inside an array, and it only seems to work if I write unicode notation, e.g. "\u1234" per char. I was wondering if there is some easier way to do this, maybe somehow specify to the browser that the js file is utf8-encoded or something similar, but I'm not sure how to do that.

    any ideas?
    tnx

  2. #2
    Join Date
    Aug 2011
    Posts
    3
    one more thing: i DO include the script with a charset attribute like so:
    Code:
    <script src="myscript.js" type="application/x-javascript" charset="utf-8"></script>

  3. #3
    Join Date
    Aug 2011
    Posts
    3

    problem solved :-)

    sorry, forgot to actually SAVE the js file with utf8 encoding, my nodepad++ editor was set to ANSI.

  4. #4
    Join Date
    May 2011
    Posts
    101
    We've all done it, sometime, sagimann !



    Chris

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles