View Full Version : Greek from XML
Reverb9
June 5th, 2008, 04:57 PM
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
Alex Lexcuk
June 5th, 2008, 05:28 PM
UTF-8
http://dnadillo.dn.ua/fla/XML/img-xml.swf
Reverb9
June 5th, 2008, 05:38 PM
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!
Alex Lexcuk
June 6th, 2008, 03:54 AM
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
img_xml.xml
hi has UTF-8
Test him, and change him according to your desire
Pier25
June 6th, 2008, 02:59 PM
in your editor you also have to save the file with utf8 enconding
Reverb9
June 7th, 2008, 07:40 AM
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/
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:
tf.embedFonts = true;
tf.text = "Dynamic text: ΑντοχήΣΧΕΔΊΑΣΗΚΆΜΕΡΑ";
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!
Pier25
June 7th, 2008, 08:40 PM
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...
Reverb9
June 9th, 2008, 05:06 AM
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.
Reverb9
June 9th, 2008, 05:07 AM
Thanks for your time!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.