After asking "Do certain characters take more bytes than others?", I figured out that I'd need to set the character encoding set when receiving and sending data with a socket connection in Actionscript / Flex 3.
Now I've been trying to find out how to do this, however there doesn't seem to be such property available. Is there any special way of doing this?
The flash.net.Socket class is a binary input/output class. You do not specify the encoding for the socket itself because you have low-level access to the data in the socket.
What you're looking for is the Socket::readMultiByte method for reading strings from different character sets.
Likewise, use Socket::writeMultiByte for writing strings from a specific character set.
As far as I know, Flash supports only Unicode... though there is the option to use the OS's code page with System.useCodePage. But it will depend on the user's OS and language, and is not recommended unless you know exactly what you are doing.
As for using less bytes per character, I understand that alphanumeric characters use only one byte in UTF-8 .
Cheers...