[haXe] Exchanging Unicode strings via remoting
Michael Pliskin
pl at tepkom.ru
Wed Aug 9 17:44:28 CEST 2006
Hello Nicolas,
NC> Flash strings are UTF-8.
But what about flash strings generated from user input? Will they be
utf8? I thought flash works with Unicode (utf16) internally..
I'm actually experiencing some pretty weird issues deserializing large
data structures containing unicode chars on the server, trying to
understand what's wrong. Now when I enter a cyrillic string to a flash
textfield and then send it to server in a datastructure, I am getting
exception - seems like a similar problem is a cause for other
problems.
NC> You can check that the strings on the client are correctly encoded at
NC> compilation-time by trace'ing them. They should display correctly (as
NC> soon as the default font is capable of displaying the utf chars). If
NC> not, then try setting your editor/IDE so you can edit in UTF8-mode. If a
NC> correct UTF-8 string is given to the haxe compiler, it will leave it
NC> as-it in the generated SWF.
NC> Neko strings are byte-buffers, with an UTF8 API (the neko.Utf8 module).
NC> haXe remoting currently transfers only UTF8 strings. Your example should
NC> work fine since adding two byte buffers and adding two UTF8 strings
NC> should provide the same result.
NC> Nicolas
--
Best regards,
Michael mailto:pl at tepkom.ru
More information about the Haxe
mailing list