# Greek from XML

**URL:** <https://forum.kirupa.com/t/greek-from-xml/262429>\
**Category:** flash\
**Created:** [June 5, 2008, 8:57pm UTC](https://forum.kirupa.com/t/greek-from-xml/262429 "2008-06-05T20:57:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reverb9](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Reverb9](https://forum.kirupa.com/u/Reverb9)\
**Post date:** [June 5, 2008, 8:57pm UTC](https://forum.kirupa.com/t/greek-from-xml/262429/1 "2008-06-05T20:57:59Z")

</div>

I´m loading text via XML and when I trace it it looks fine in the output window. So the data is there. But, when I add it to a text field on the stage the text comes up as squares on the stage. Some of the words that only contain latin characters look fine.

I´ve tried to save the XML file in various ways with both Dreamweaver and Notepad, greek encoding, UTF-8, iso-8859-7, Unicode, Unicode big endian etc but to no success.

Also, when writing the greek text in a static textfield with the same font as the embedded one - it shows! So the characters are there in the font. But it all goes Pete Tong somewhere between the XML data and my textfield.

Please help! My deadline has already passed.

(I´ve seen some PHP solutions but PHP is not an option on the server we´re running)

Thanks in advance  
Pierre

---

<div class="post-metadata">

**Author:** ![Alex\_Lexcuk](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Alex\_Lexcuk](https://forum.kirupa.com/u/Alex_Lexcuk)\
**Post date:** [June 5, 2008, 9:28pm UTC](https://forum.kirupa.com/t/greek-from-xml/262429/2 "2008-06-05T21:28:00Z")

</div>

UTF-8  
[http://dnadillo.dn.ua/fla/XML/img-xml.swf](http://dnadillo.dn.ua/fla/XML/img-xml.swf)

---

<div class="post-metadata">

**Author:** ![Reverb9](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Reverb9](https://forum.kirupa.com/u/Reverb9)\
**Post date:** [June 5, 2008, 9:38pm UTC](https://forum.kirupa.com/t/greek-from-xml/262429/3 "2008-06-05T21:38:48Z")

</div>

So my XML looks something like:  
\<?xml version=“1.0” encoding=“UTF-8”?\>  
\<tags\>  
\<tag1\>  
\<designtag\>Σχεδίαση\</designtag\>  
\</tag1\>  
\</tags\>

it should work, right? I´ve tried that along with saving the .xml as UTF-8 in Notepad. No luck. I have even tried with System.useCodePage = true; but that didn´t do it either.

Thanks for your time!

---

<div class="post-metadata">

**Author:** ![Alex\_Lexcuk](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Alex\_Lexcuk](https://forum.kirupa.com/u/Alex_Lexcuk)\
**Post date:** [June 6, 2008, 7:54am UTC](https://forum.kirupa.com/t/greek-from-xml/262429/4 "2008-06-06T07:54:02Z")

</div>

not use this \<?xml version=“1.0” encoding=“UTF-8”?\>

Open my xml file from  
[http://dnadillo.dn.ua/fla/XML/img-xml-img.zip](http://dnadillo.dn.ua/fla/XML/img-xml-img.zip)  
img\_xml.xml  
hi has UTF-8  
Test him, and change him according to your desire

---

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [June 6, 2008, 6:59pm UTC](https://forum.kirupa.com/t/greek-from-xml/262429/5 "2008-06-06T18:59:50Z")

</div>

in your editor you also have to save the file with utf8 enconding

---

<div class="post-metadata">

**Author:** ![Reverb9](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Reverb9](https://forum.kirupa.com/u/Reverb9)\
**Post date:** [June 7, 2008, 11:40am UTC](https://forum.kirupa.com/t/greek-from-xml/262429/6 "2008-06-07T11:40:16Z")

</div>

Thank you for your help Alex and Pier but it turns out it´s probably not an XML Encoding -problem.

Check this out: [http://locomotiv.globalinn.se/greektest/](http://locomotiv.globalinn.se/greektest/)  
One field with static text that is looking fine. And the other with dynamic text is not looking very good. Here´s the code for the textfield:

```auto
tf.embedFonts = true;
tf.text = "Dynamic text: &#913;&#957;&#964;&#959;&#967;&#942;&#931;&#935;&#917;&#916;&#906;&#913;&#931;&#919;&#922;&#902;&#924;&#917;&#929;&#913;";

```

The text “Dynamic text: ΑντοχήΣΧΕΔΊΑΣΗΚΆΜΕΡΑ” is added to the text field and I´ve clicked Auto Fill in the embed options. So, the characters are there.

Could this be a codePage problem? I´ve tried useCodePage as both true and false and none works.

Please - I need more help!

---

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [June 8, 2008, 12:40am UTC](https://forum.kirupa.com/t/greek-from-xml/262429/7 "2008-06-08T00:40:01Z")

</div>

is the error consistent on all browsers, platforms,players?

Once I had the weirdest issue… but only in firefox. It was because wmode=transparent on firefox bugged the player…

---

<div class="post-metadata">

**Author:** ![Reverb9](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Reverb9](https://forum.kirupa.com/u/Reverb9)\
**Post date:** [June 9, 2008, 9:06am UTC](https://forum.kirupa.com/t/greek-from-xml/262429/8 "2008-06-09T09:06:56Z")

</div>

Turned out to be a font export problem after all. GreekHelvetica just didn´t work in my dynamic textfield. Switched to Arial and it works. Took me three days and a font change. Christ!

But it´s still very weird that I could write the text statically and not dynamically. Not the most obvious place to start the error search.

---

<div class="post-metadata">

**Author:** ![Reverb9](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Reverb9](https://forum.kirupa.com/u/Reverb9)\
**Post date:** [June 9, 2008, 9:07am UTC](https://forum.kirupa.com/t/greek-from-xml/262429/9 "2008-06-09T09:07:34Z")

</div>

Thanks for your time!
