Character encoding

The Vivox SDK supports UTF-8 encoding for group text communication services and for buddy/presence services.

Note: UTF-8 is backward compatible with printable standard ASCII. If your application uses only printable standard ASCII for text and presence, then no changes are needed.

Arrays that contain text with UTF-8 encoding must have their length specified by the number of bytes, and not by the number of display characters.

For example, the following 9 characters will be sent as a message. They are represented in UTF-8 by an array of 27 bytes. When sending the message, specifying 9 rather than 27 bytes can cause truncation of the message.

私の車は青色です。
{
	0xE7,  0xA7,  0x81,
	0xE3,  0x81,  0xAE,
	0xE8,  0xBB,  0x8A,
	0xE3,  0x81,  0xAF,
	0xE9,  0x9D,  0x92,
	0xE8,  0x89,  0xB2,
	0xE3,  0x81,  0xA7,
	0xE3,  0x81,  0x99,
	0xE3,  0x80,  0x82
}