Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / August 2007



Tip: Looking for answers? Try searching our database.

Loading ISO-8859 (Latin1) characters from XML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sake_boy - 29 Aug 2007 17:37 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.