Submit Your Article Forum Rules

Results 1 to 2 of 2

Thread: Extended characters in javascript

  1. #1
    Member John's Avatar
    Join Date
    Oct 2006
    Location
    Brisbane - Australia
    Posts
    76

    Extended characters in javascript

    Hi all

    I am having real trouble coming up with the right code in Javascript for some Croatian characters.
    This is the code I have
    Code:
    trans["Keywords"] = "Ključne riječi";
    but the č character needs to be encoded somehow, but I just cannot figure out how to do it.
    I thought I had to use
    Code:
    \& #269;     (without the space after &)
    but that is not working, and searching the web is not giving me any joy.

    Thanks

  2. #2
    Member John's Avatar
    Join Date
    Oct 2006
    Location
    Brisbane - Australia
    Posts
    76
    I figured it out with the help of fileformat.info/info/unicode/char/010d/index.htm.
    The right code is
    Code:
    trans["Keywords"] = "Klju\u010Dne Rije\u010Di";
    That will show " Ključne Riječi "

Posting Permissions

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