v6ktw2 | sa.yona.la help | tags | register | sign in

v6ktw2

encode

UTF-8 Decoding & Encoding

reply

// U-00000000 - U-0000007F: 0xxxxxxx

// U-00000080 - U-000007FF: 110xxxxx 10xxxxxx

// U-00000800 - U-0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx

// U-00010000 - U-001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx

// U-00200000 - U-03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx

// U-04000000 - U-7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx


byte GetUTF8ByteCount(byte first)
{
	if (first < 0x80) return 1;
...

continue ...

posted by v6ktw2 | reply (0)

api | terms of service | privacy policy | support Copyright (C) 2017 HeartRails Inc. All Rights Reserved.