PDA

View Full Version : "undefined" - if XML attribute contains German special chars (üõöä)


zangbomm
11-08-2007, 10:55 PM
Hello!
I found out that if XML file's attribute contains German special chars (chars with umlaut, like: üõöä - ä ü &ouml then I get "undefined" answer when I try to read an attributes value. I tryed to change XML file encoding to: "UTF-8" and "iso-8859-1" but still no luck. "system.useCodepage = true; " doesn't help as well :confused:

Flash Gordon
11-08-2007, 11:01 PM
lets see a short example xml file

zangbomm
11-09-2007, 08:12 AM
<?xml version="1.0" encoding="UTF-8"?>
<PERSONAL>
<Rida id="HARJ" N="Kätlin" Pilt="Pildid/Pole2.jpg" Mail="Villane.Sokk@test.de" Amet="Peaspetsialist" Osakond="Test osakond" Byroo="Kalevi büroo" Koht="16" />
</PERSONAL>


All does work well as soon as I delete letters: "üõö" Somehow letter "ä" is ok. Also it works if I publish it for Flash Player 6. If I delete attribute "Byroo" or just a letter "ü" from this XML, it works like a charm. I dunno if u guys can see these letters in this post, browser needs baltic encoding enabled for this I guess.

zangbomm
11-09-2007, 12:20 PM
Just in case, example how data is read from XML file:

trace(my_xml.firstChild.childNodes[0].attributes.Pilt);

and so on...