PDA

View Full Version : Extended characters in javascript



John
02-18-2011, 02:43 AM
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
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
\& #269; (without the space after &) but that is not working, and searching the web is not giving me any joy.

Thanks

John
02-18-2011, 07:22 AM
I figured it out with the help of fileformat.info/info/unicode/char/010d/index.htm.
The right code is
trans["Keywords"] = "Klju\u010Dne Rije\u010Di";That will show " Ključne Riječi "