This is the first time I try not only WebApps, but more than trivial JavaScript, so please forgive if this is a simple question:

If I have text in my index.html and want to manipulate it using JavaScript, non-ASCII characters get messed up. They display as a square in both the emulator and the device. The same code works fine on a desktop browser, so I guess there's no fundamental non-Nokia issue I'm having with JavaScript.


I take the basic template from the Nokia Web Tools (where charset is set to UTF-8) and put the following into the body:
HTML Code:
		<p id="one">ÖÄÜ</p>

		<p id="two"></p>
Then, in the JavaScript, I do:
	var newtextnode = document.createTextNode(document.getElementById('one').firstChild.nodeValue);
The expected result would be
(which is what a regular browser gives me)

What I get in the S40 environment is:

I tried to replace the characters using HTML entities, no difference. Any ideas?