Re: [Flashcoders] Localization issue with XML

2007-03-22 Thread Birgit Ferran

Steven,

I had a similar problem when loading external xml files. The java 
servlet I was using to create and save the files on the server was 
saving them with UTF-8 encoding but when I imported them into Flash, 
some of the special characters did not show properly. I removed the 
encoding attribute from the XML header leaving it like this ?xml 
version=1.0 ? and lo and behold! the characters came out correctly.


Birgit

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Localization issue with XML

2007-03-22 Thread Hans Wichman

Hi,
i just finished an app with the same characters in it. It contains no header
and is a unicode file.
The file was generated from a database to ascii (which is stupid but
whatever) so I used a commandline vbscript for the conversion from my
buildfile.
If you like I can send you the xml file and script, for testing etc.

greetz
JC




On 3/22/07, Birgit Ferran [EMAIL PROTECTED] wrote:


Steven,

I had a similar problem when loading external xml files. The java
servlet I was using to create and save the files on the server was
saving them with UTF-8 encoding but when I imported them into Flash,
some of the special characters did not show properly. I removed the
encoding attribute from the XML header leaving it like this ?xml
version=1.0 ? and lo and behold! the characters came out correctly.

Birgit

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Localization issue with XML

2007-03-21 Thread Ivan Dembicki
Hello Steven,

SSB XML header is
SSB ?xml version=1.0 encoding=UTF-8 ?
- this string is ignored by AS XML parser.
  is your really file saved as UTF-8?


-- 
Ivan Dembicki
__
[EMAIL PROTECTED] | http://www.artlebedev.ru | http://www.sharedfonts.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Localization issue with XML

2007-03-21 Thread Søren Christensen



if it isnt a coded textfield you need to define each special  
character using the 'embed' button in the inspector (while the tf is  
selected) in the 'include these charecters' field


Cheers,
B) Søren



On Mar 21, 2007, at 12:44 PM, Måns Asplund wrote:


Hi Steven!
I had the same problem with swedish letters (å ä ö) and the  
solution was

easy and obvious.
I wrote something about it, just can´t find it now (not at the  
office at the

moment).

I´ll send the soloution as soon as I´m back at the office.

|.Måns



2007/3/20, Nimrod Huberman [EMAIL PROTECTED]:


Im not sure it's the right direction but you can try:
system.useCodepage=true;
Nimrod

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Steven

Sacks
| BLITZ
Sent: Tuesday, March 20, 2007 8:32 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Localization issue with XML

Hey Flashcoders,

I'm having an issue with special characters not showing up from other
languages, such as German (ü, ö, etc.).  The issue is specifically  
with

text
loaded in from XML.

The textfields are set to embed all latin glyphs (1076 glyphs,  
Uppercase,

Lowercase, Numerals, Punctuation, Latin I, Latin Extended A, Latin
Extended
B, and Latin Extended Add'l).

All text is wrapped in CDATA tags.

I've tried saving the xml file with 8 bit and UTF-8 encoding and  
neither

works.

XML header is
?xml version=1.0 encoding=UTF-8 ?

If I set the text of the textfield with Actionscript to a string with
those
characters in it, no problem, they all show up just fine.

// This works
txt.htmlText = wofür benötigen;

However, when I display it from the XML, they show up as regular o  
and u

characters.

// Does not work
item![CDATA[wofür benötigen]]/item

Any ideas?

Thanks,
Steven
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Localization issue with XML

2007-03-21 Thread Steven Sacks | BLITZ
You're telling me to do something that I specifically said I already have done.


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Søren Christensen
 Sent: Wednesday, March 21, 2007 9:04 AM
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Localization issue with XML
 
 
 
 if it isnt a coded textfield you need to define each special 
 character using the 'embed' button in the inspector (while the tf is
 selected) in the 'include these charecters' field
 
 Cheers,
  B) Søren
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  Steven Sacks
  | BLITZ
  Sent: Tuesday, March 20, 2007 8:32 PM
  To: flashcoders@chattyfig.figleaf.com
  Subject: [Flashcoders] Localization issue with XML
 
  Hey Flashcoders,
 
  I'm having an issue with special characters not showing up 
 from other 
  languages, such as German (ü, ö, etc.).  The issue is specifically 
  with text loaded in from XML.
 
  The textfields are set to embed all latin glyphs (1076 glyphs, 
  Uppercase, Lowercase, Numerals, Punctuation, Latin I, 
 Latin Extended 
  A, Latin Extended B, and Latin Extended Add'l).
 
  All text is wrapped in CDATA tags.
 
  I've tried saving the xml file with 8 bit and UTF-8 encoding and 
  neither works.
 
  XML header is
  ?xml version=1.0 encoding=UTF-8 ?
 
  If I set the text of the textfield with Actionscript to a 
 string with 
  those characters in it, no problem, they all show up just fine.
 
  // This works
  txt.htmlText = wofür benötigen;
 
  However, when I display it from the XML, they show up as regular o 
  and u characters.
 
  // Does not work
  item![CDATA[wofür benötigen]]/item
 
  Any ideas?
 
  Thanks,
  Steven
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Localization issue with XML

2007-03-21 Thread Måns Asplund

Hello Steven I´ve done it like this:
Dynamic textfield named info_txt set to embed (in this case) ü and ö.

Load and parse XML:
/
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
information = [];
total = xmlNode.childNodes.length;
for (i=0; itotal; i++) {
information[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(xml.xml);
p = 0;
this.onEnterFrame = function() {
info_txt.htmlText = information[p];
}
/

Loading the xml.xml file that looks like this:

?xml version=1.0 encoding=UTF-8?
   web
   items
   item![CDATA[wofür benötigen]]/item
   /items
   /web

The XML file is saved as UTF-8 encoding from notepad.

Works fine, here´s a link:
http://www.stiladig.nu/xml/
and
http://www.stiladig.nu/xml/xml.zip

|.Måns



2007/3/20, Steven Sacks | BLITZ [EMAIL PROTECTED]:


Hey Flashcoders,

I'm having an issue with special characters not showing up from other
languages, such as German (ü, ö, etc.).  The issue is specifically with text
loaded in from XML.

The textfields are set to embed all latin glyphs (1076 glyphs, Uppercase,
Lowercase, Numerals, Punctuation, Latin I, Latin Extended A, Latin Extended
B, and Latin Extended Add'l).

All text is wrapped in CDATA tags.

I've tried saving the xml file with 8 bit and UTF-8 encoding and neither
works.

XML header is
?xml version=1.0 encoding=UTF-8 ?

If I set the text of the textfield with Actionscript to a string with
those characters in it, no problem, they all show up just fine.

// This works
txt.htmlText = wofür benötigen;

However, when I display it from the XML, they show up as regular o and u
characters.

// Does not work
item![CDATA[wofür benötigen]]/item

Any ideas?

Thanks,
Steven
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re[2]: [Flashcoders] Localization issue with XML

2007-03-21 Thread Ivan Dembicki
Hello Mans,

MA The XML file is saved as UTF-8 encoding from notepad.
- yes. here is his problem. 100%


-- 
Ivan Dembicki
__
[EMAIL PROTECTED] | http://www.artlebedev.ru | http://www.sharedfonts.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Localization issue with XML

2007-03-20 Thread Steven Sacks | BLITZ
Hey Flashcoders,

I'm having an issue with special characters not showing up from other 
languages, such as German (ü, ö, etc.).  The issue is specifically with text 
loaded in from XML.  

The textfields are set to embed all latin glyphs (1076 glyphs, Uppercase, 
Lowercase, Numerals, Punctuation, Latin I, Latin Extended A, Latin Extended B, 
and Latin Extended Add'l).

All text is wrapped in CDATA tags.

I've tried saving the xml file with 8 bit and UTF-8 encoding and neither works.

XML header is 
?xml version=1.0 encoding=UTF-8 ?

If I set the text of the textfield with Actionscript to a string with those 
characters in it, no problem, they all show up just fine. 

// This works
txt.htmlText = wofür benötigen;

However, when I display it from the XML, they show up as regular o and u 
characters.

// Does not work
item![CDATA[wofür benötigen]]/item

Any ideas?

Thanks,
Steven
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Localization issue with XML

2007-03-20 Thread Merrill, Jason
However, when I display it from the XML, they show up as 
regular o and u characters.

// Does not work
item![CDATA[wofür benötigen]]/item

Any ideas?

Have you tried decoding the entities?  I use this trick to decode entities in 
XML when I have problems reading in special characters:

private function decodeEntities(entityString:String):String 
{
var x:XML = new XML(n+entityString+/n); 
x.parseXML();
return x.firstChild.firstChild.nodeValue;
}

Send the function a string of the text value from the XML and see if that works.


Jason Merrill
Bank of America  
Global Technology  Operations
Learning  Leadership Development 
eTools  Multimedia Team

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Localization issue with XML

2007-03-20 Thread eka

Hello :)

if you can change you DOM to create a localization pattern in your
application.. you can use my Eden localization model based on my OpenSource
framework (VEGAS : http://vegas.riaforge.org/) and the EDEN format (
http://code.google.com/p/edenrr/)

You can install my framework and use the Eden implementation based on VEGAS
:

0 - Download VEGAS or use a SVN client (like tortoiseSVN)

1 - install the vegas source project in the AS2 preference of Flash or if
you use MTASC add the AS2/trunk/src package.

2 - try the example based on Eden in the directory :
AS2/trunk/bin/test/asgard/system

http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/system/

The example Localization 02 -
Eden.flahttp://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/system/Localization%2002%20-%20Eden.fla
use the EDEN external file :
http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/system/deploy/locale/localize_fr.eden

The Eden format is a format based on ECMAScript and ActionScript notation !
You must create a empty UTF8 text file and creates inside an easy object :)

For me this method is better like XML and this CDATA ;)

EKA+ :)


2007/3/20, Steven Sacks | BLITZ [EMAIL PROTECTED]:


Hey Flashcoders,

I'm having an issue with special characters not showing up from other
languages, such as German (ü, ö, etc.).  The issue is specifically with text
loaded in from XML.

The textfields are set to embed all latin glyphs (1076 glyphs, Uppercase,
Lowercase, Numerals, Punctuation, Latin I, Latin Extended A, Latin Extended
B, and Latin Extended Add'l).

All text is wrapped in CDATA tags.

I've tried saving the xml file with 8 bit and UTF-8 encoding and neither
works.

XML header is
?xml version=1.0 encoding=UTF-8 ?

If I set the text of the textfield with Actionscript to a string with
those characters in it, no problem, they all show up just fine.

// This works
txt.htmlText = wofür benötigen;

However, when I display it from the XML, they show up as regular o and u
characters.

// Does not work
item![CDATA[wofür benötigen]]/item

Any ideas?

Thanks,
Steven
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

RE: [Flashcoders] Localization issue with XML - SOLVED!

2007-03-20 Thread Steven Sacks | BLITZ
And I solved it heh so thanks anyway!

Solution was to use the numeric codes.



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Steven Sacks | BLITZ
 Sent: Tuesday, March 20, 2007 11:32 AM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] Localization issue with XML
 
 Hey Flashcoders,
 
 I'm having an issue with special characters not showing up 
 from other languages, such as German (ü, ö, etc.).  The issue 
 is specifically with text loaded in from XML.  
 
 The textfields are set to embed all latin glyphs (1076 
 glyphs, Uppercase, Lowercase, Numerals, Punctuation, Latin I, 
 Latin Extended A, Latin Extended B, and Latin Extended Add'l).
 
 All text is wrapped in CDATA tags.
 
 I've tried saving the xml file with 8 bit and UTF-8 encoding 
 and neither works.
 
 XML header is
 ?xml version=1.0 encoding=UTF-8 ?
 
 If I set the text of the textfield with Actionscript to a 
 string with those characters in it, no problem, they all show 
 up just fine. 
 
 // This works
 txt.htmlText = wofür benötigen;
 
 However, when I display it from the XML, they show up as 
 regular o and u characters.
 
 // Does not work
 item![CDATA[wofür benötigen]]/item
 
 Any ideas?
 
 Thanks,
 Steven
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Localization issue with XML

2007-03-20 Thread Nimrod Huberman
Im not sure it’s the right direction but you can try:
system.useCodepage=true;
Nimrod

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks
| BLITZ
Sent: Tuesday, March 20, 2007 8:32 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Localization issue with XML

Hey Flashcoders,

I'm having an issue with special characters not showing up from other
languages, such as German (ü, ö, etc.).  The issue is specifically with text
loaded in from XML.  

The textfields are set to embed all latin glyphs (1076 glyphs, Uppercase,
Lowercase, Numerals, Punctuation, Latin I, Latin Extended A, Latin Extended
B, and Latin Extended Add'l).

All text is wrapped in CDATA tags.

I've tried saving the xml file with 8 bit and UTF-8 encoding and neither
works.

XML header is 
?xml version=1.0 encoding=UTF-8 ?

If I set the text of the textfield with Actionscript to a string with those
characters in it, no problem, they all show up just fine. 

// This works
txt.htmlText = wofür benötigen;

However, when I display it from the XML, they show up as regular o and u
characters.

// Does not work
item![CDATA[wofür benötigen]]/item

Any ideas?

Thanks,
Steven
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com