This is my first post here - kirupa seems like the obvious place to seek out reliable information from what I’ve researched!
First off, as the forum requested, I am using Flash MX 2004 (ActionScript 2.0).
I am having some bizarre issues with international characters when reading XML data into Flash, and then rendering it as HTML within Flash.
I’ll preface this by saying that I figured out how to properly read HTML from XML text into Flash, and have it display properly (with all HTML code working) in Flash.
The problem happens when I run into international characters, such as “é”. I have scoured the net for a long time, and have tried nearly everything, including:
- saving the XML in UTF-8 format
- embedding the fonts/characters
- trying to code the special characters as hexadecimal, decimal, and URL-encoded form (within the XML)
One of the biggest and most bizarre issues seems to be that when I embed the font/characters (using “Arial” currently), it seems to turn off HTML functionality. An example is that BEFORE I embed the fonts, “<br>” will work in Flash, but AFTER I embed the fonts, the HTML-rendering goes nuts (loses <br> and text prior/after, depending, etc.)
XML (saved as UTF-8 from NotePad):*
<caption><![CDATA[Piè ;rre is a chef.<br><b>He loves to cook!</b>]]>caption>
(space added after “232” in order to not have it rendered as “è” in this post)
_root.txt_caption.htmlText = “<p align = ‘right’>” + _root.var_caption + “</p>”;
(not that this code works 100% fine with no international symbols or font embedding… I open and close the paragraph tags and toss the text from the XML directly in the middle)
Returns (in Flash, with NO font embedding):
Pi�e is a chef.
He loves to cook!
(the “è” is not displayed correctly, and it deletes the letters “rr” after it)
Returns (in Flash, WITH font embedding):
He loves to cook!
(the entire first line is deleted)
Any help would be GREATLY appreciated. I’m really at a stand-still, and this work is under a rather intense deadline.
Thanks in advance - I look forward to working with you!