mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
parse_string: remove useless first byte marks for utf8
This commit is contained in:
parent
d7b5545748
commit
dded751757
6
cJSON.c
6
cJSON.c
@ -396,15 +396,13 @@ static unsigned parse_hex4(const unsigned char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* first bytes of UTF8 encoding for a given length in bytes */
|
/* first bytes of UTF8 encoding for a given length in bytes */
|
||||||
static const unsigned char firstByteMark[7] =
|
static const unsigned char firstByteMark[5] =
|
||||||
{
|
{
|
||||||
0x00, /* should never happen */
|
0x00, /* should never happen */
|
||||||
0x00, /* 0xxxxxxx */
|
0x00, /* 0xxxxxxx */
|
||||||
0xC0, /* 110xxxxx */
|
0xC0, /* 110xxxxx */
|
||||||
0xE0, /* 1110xxxx */
|
0xE0, /* 1110xxxx */
|
||||||
0xF0, /* 11110xxx */
|
0xF0 /* 11110xxx */
|
||||||
0xF8,
|
|
||||||
0xFC
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Parse the input text into an unescaped cstring, and populate item. */
|
/* Parse the input text into an unescaped cstring, and populate item. */
|
||||||
|
Loading…
Reference in New Issue
Block a user