0 Replies Latest reply on Sep 25, 2007 10:23 AM by Julio Carneiro

    multibyte utf-8 charcters in XML

    Julio Carneiro
      I'm generating XML data to sent to a webservice and having trouble with utf-8 multibyte characters.
      For example é, ç, ñ, those characters are being sent in the machines native encoding (mac roman in my case).

      The code that generates the XML goes somewhat like this:

      var resultXML:XML = new XML(<recordData/>);
      ...
      ...
      resultXML.appendChild(XML('<field><![CDATA['+o.text+']'+']></field>')); // trick to send text as CDATA
      ...

      If the object has only USASCII chars it all works fine but fails with characters above ascii-127.

      I've not been able to find a method to convert my text to multibyte utf-8.
      Is there such a thing in Flex/Flash?

      Is there any other way to ensure my xml data is a true utf-8 stream?

      TIA
      julio