#define _SEQ2 0xc0
#define _SEQ3 0xe0
#define _SEQ4 0xf0
#define _SEQ5 0xf8
#define _SEQ6 0xfc
if ((*p & 0x80) == 0)//当*p小于0x80时,&结果为0.utf-8单个字节有效范围在7F.
high = (wchar_t)*p;
else if ((*p & 0xe0) == _SEQ2) {//0xe0:11100000,_SEQ2:11000000,*p如果是110xxxxx的话,&结果就等于_SEQ2.
n = 2;
high = (wchar_t)(*p & 0x1f);//0x1f:0001 1111,获取unicode码有效位。这是高位。
} else if ((*p & 0xf0) == _SEQ3) {
n = 3;
high = (wchar_t)(*p & 0x0f);
} else if ((*p & 0xf8) == _SEQ4) {
n = 4;
high = (wchar_t)(*p & 0x07);
} else if ((*p & 0xfc) == _SEQ5) {
n = 5;
high = (wchar_t)(*p & 0x03);
} else if ((*p & 0xfe) == _SEQ6) {
n = 6;
high = (wchar_t)(*p & 0x01);
obsstudio