C String:
declare:
<span style="font-family:Comic Sans MS;">const char *s = "abcdef";</span>
String in C is a char array ending with null,whose ASCII is 0.strlen(s) return the length not include null.
Order the bytes representing an object:
when presenting a hexadecimal value of 0x01234567
little endian: 67 45 23 01
big endian: 01 23 45 67
ASCII、unicode、UTF-
ASCII: only suitable for English text. 1 byte for a char.
unicode: cover most human languages and signal, a signal set.Only tell you what a char's binary code is, doesn't tell you how to store it.
UTF-8: one of implements of unicode, variable length(1~4bytes),if a char can be represented by ASCII, its code in UTF-8 is the same as in ASCII.
standand for UTF-8
range | binary code
0000
0000-0000 007F | 0xxxxxxx
0000 0080-0000 07FF | 110xxxxx 10xxxxxx
0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
0000 0080-0000 07FF | 110xxxxx 10xxxxxx
0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx