Hello Steven I´ve done it like this:
Dynamic textfield named info_txt set to embed (in this case) ü and ö.

Load and parse XML:
/////////////////////////////////////////////////////////////////////////////////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
information = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
information[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml.xml");
p = 0;
this.onEnterFrame = function() {
info_txt.htmlText = information[p];
}
/////////////////////////////////////////////////////////////////////////////////////////

Loading the xml.xml file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
   <web>
       <items>
           <item><![CDATA[wofür benötigen]]></item>
       </items>
   </web>

The XML file is saved as UTF-8 encoding from notepad.

Works fine, here´s a link:
http://www.stiladig.nu/xml/
and
http://www.stiladig.nu/xml/xml.zip

|.Måns



2007/3/20, Steven Sacks | BLITZ <[EMAIL PROTECTED]>:

Hey Flashcoders,

I'm having an issue with special characters not showing up from other
languages, such as German (ü, ö, etc.).  The issue is specifically with text
loaded in from XML.

The textfields are set to embed all latin glyphs (1076 glyphs, Uppercase,
Lowercase, Numerals, Punctuation, Latin I, Latin Extended A, Latin Extended
B, and Latin Extended Add'l).

All text is wrapped in CDATA tags.

I've tried saving the xml file with 8 bit and UTF-8 encoding and neither
works.

XML header is
<?xml version="1.0" encoding="UTF-8" ?>

If I set the text of the textfield with Actionscript to a string with
those characters in it, no problem, they all show up just fine.

// This works
txt.htmlText = "wofür benötigen";

However, when I display it from the XML, they show up as regular o and u
characters.

// Does not work
<item><![CDATA[wofür benötigen]]></item>

Any ideas?

Thanks,
Steven
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to