views:

38

answers:

1

Hi

I'm trying to print some Japanese to a page dynamically using jQuery, and it display nothing recognizable. I don't know what went wrong, I reduced the code to the most straight-forward, and it doesn't fix it. Or maybe it's just me being thick.

I use:

$('body').append('<p>日本語</p>');

Which should work, right?

And I get:

日本語

Huh?

+3  A: 

Have you made sure that your page is set to use the Japanese character set? If not, make sure that your charset is defined in your <head></head> node :

<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
Richard Neil Ilagan
I just knew it was right in front of me. Thanks!
passcod
UTF-8 would work, too.
Thilo
@passcod ~ no prob. You should consider @Thilo's answer too, especially if you're going to be working with hoards of different character types. :)
Richard Neil Ilagan