List of utility methods to do Char Array to UTF
int | charsToUtf(char[] src, int srcIndex, byte[] dst, int dstIndex, int len) Copy characters in source array to bytes in target array, converting them to Utf8 representation. int j = dstIndex; int limit = srcIndex + len; for (int i = srcIndex; i < limit; i++) { char ch = src[i]; if (1 <= ch && ch <= 0x7F) { dst[j++] = (byte) ch; } else if (ch <= 0x7FF) { dst[j++] = (byte) (0xC0 | (ch >> 6)); ... |