Have some experience loading XML files, but this is a new issue to me. I see my
accented characters displaying properly in my text editor. And I've confirmed
that my font is OK in Flash by testing a dynamic text box--the accents in the
test appear OK, so it's not the XML file or the font, it seems to be the XML
loader itself.
My XML file looks like this (there are Latin accented characters in the text
node:
<?xml version="1.0" encoding="ISO-8859-1"?>
<projects>
<project id="0">
<_iID>0</_iID>
<_sProjectDescription>La piratería es una práctica, tan antigua como la
navegación misma, en la que una embarcación privada o una estatal amotinada
ataca a otra en aguas internacionales o en lugares no sometidos a la
jurisdicción de ningún Estado, con un propósito personal para robar su carga,
exigir rescate por los pasajeros, convertirlos en esclavos y muchas veces
apoderamiento de la nave misma.</_sProjectDescription>
</project>
</projects>
BUT, once Flash loads the XML, I trace it out and the output misses these
characters:
<_sProjectDescription>La pirater?a es una pr?ctica, tan antigua como la
navegaci?n misma, en la que una embarcaci?n privada o una estatal amotinada
ataca a otra en aguas internacionales o en lugares no sometidos a la
jurisdicci?n de ning?n Estado, con un prop?sito personal para robar su carga,
exigir rescate por los pasajeros, convertirlos en esclavos y muchas veces
apoderamiento de la nave misma.</_sProjectDescription>
Is this a known issue I don't know about? I can't find anything in the
documentation and have scoured the web for hours for an answer.
Any help would be greatly appreciated! Below for reference is my load function
for reference.Thanks.
SB
--
function loadXML()
{
trace("loadXML()");
map_xml.ignoreWhite = true;
map_xml.onLoad = function(success:Boolean) //handleLoad becomes a method of
map_xml
{
if(success)
{
trace("loadXML: XML Status: " + map_xml.status);
trace("loadXML: XML load success. XML:");
trace(map_xml);
handleXMLLoad();
}
else
{
trace("loadXML: ***ERROR - map_xml.load FAILED.*** Status/Error code: "+
map_xml.status);
}
}
map_xml.load("xml/Map_data.xml"); //read from XML file.
}
Gorka Ludlow - 30 Aug 2007 15:23 GMT
Try this:
System.useCodePage = true;
Cheers,
Gorka
http://www.AquiGorka.com/blog
sake_boy - 30 Aug 2007 16:28 GMT
Thanks... from what I've been reading, this is supposedly an unreliable solution as it can't be predicted to work for all users.
Any other suggestions out there?