# International Characters / Embed Fonts / Reading XML / HTML Rendering in Flash

**URL:** <https://forum.kirupa.com/t/international-characters-embed-fonts-reading-xml-html-rendering-in-flash/294731>\
**Category:** flash\
**Created:** [August 19, 2009, 7:28am UTC](https://forum.kirupa.com/t/international-characters-embed-fonts-reading-xml-html-rendering-in-flash/294731 "2009-08-19T07:28:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![naylor](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@naylor](https://forum.kirupa.com/u/naylor)\
**Post date:** [August 19, 2009, 7:28am UTC](https://forum.kirupa.com/t/international-characters-embed-fonts-reading-xml-html-rendering-in-flash/294731/1 "2009-08-19T07:28:32Z")

</div>

Hey Everyone!

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.)

Example:  
\*  
XML (saved as UTF-8 from NotePad):\*

\<image\>  
\<path\>pierre.jpg\</path\>  
\<caption\>\<![CDATA[Pi&#232 ;rre is a chef.\<br\>\<b\>He loves to cook!\</b\>]]\>caption\>  
\</image\>

(space added after “232” in order to not have it rendered as “è” in this post)

* * *

_ActionSctipt 2.0:_

\_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!

- Jake
