Re: XML Islands in Firefox



tomicmi...@xxxxxxxxx wrote:

Bart Van der Donck wrote:

    <form method="get" action="#">
    <textarea cols="60" rows="10" name="zahtevek">
    <xml id="zahtevek">
     <cd:Document xmlns:cd="http://Document";>
      <cd:Data Id="Data"/>
     </cd:Document>
    </xml>
    </textarea>
    <input type="button" name="Test" value="Test"
     onclick="alert(document.forms[0].zahtevek.value);">
    </form>

I have tried that today but it doesn't work for me. Special characters
(©ÐÈÆ®¹ðèæ¾) are not properly handled when placed into and taken from
an textarea. I will have to follow Martin's advice and use
XMLHttpRequest.

If I'm receiving your encoding correctly, this looks like a two-byte
encoded UTF-8 string. The character set of the page + how it was saved
determine how it will be displayed. You appear to post from Slovenia,
so either you could use ISO-8859-2 (or one of the proprietary Central-
European code pages), or, preferably, UTF-8.

Two examples:

http://www.dotinternet.be/temp/1.htm (saved in UTF-8)
versus
http://www.dotinternet.be/temp/2.htm (not saved in UTF-8!)

My guess what you are seeing:
http://www.dotinternet.be/temp/3.htm

With this in mind, <textarea> should always return the right
characters.

--
Bart
.


Quantcast