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.
Example:
I take the basic template from the Nokia Web Tools (where charset is set to UTF-8) and put the following into the body:
Then, in the JavaScript, I do:HTML Code:<p id="one">ÖÄÜ</p> <p id="two"></p>
The expected result would beCode:var newtextnode = document.createTextNode(document.getElementById('one').firstChild.nodeValue); document.getElementById('two').appendChild(newtextnode);
ÖÄÜ
ÖÄÜ
(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?

Reply With Quote


