1 Reply Latest reply on Dec 29, 2009 12:28 AM by SergeyKrutous

    How to send non-latin unicode characters from Flex application to a web service?




      I am creating an XML containing data entered by user into a TextInput. The XML is sent then to HTTPService.

      I've tried this

      var xml : XML = <title>{_title}</title>;

      and this

      var xml : XML = new XML("<title>" + _title + "</title>");


      _title variable is filled with string taken from TextInput.


      When user enters non-latin characters (e.g. russian) the web service responds that XML contains characters that are not UTF-8.

      I run a sniffer and found that non-printable characters are sent to the web service like

      How can I encode non-latin characters to UTF-8?

      I have an idea to use ByteArray and pair of functions readMultiByte / writeMultiByte (to write in current character set and read UTF-8) but I need to determine the current character set Flex (or TextInput) is using.

      Can anyone help convert the characters?


      Thanks in advance,


      best regards,