Lines Matching +full:ch0 +full:- +full:2

16  * http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
26 /* {"title", "test 1|test 2|...|test N!", (0 or 1)}, */
31 {"u-0 is a control character", "\x00!", 0},
32 {"u-80 is a control character", "\xc2\x80!", 0},
33 {"u-800 is valid", "\xe0\xa0\x80!", 1},
34 {"u-10000 is valid", "\xf0\x90\x80\x80!", 1},
38 {"u-7f is a control character", "\x7f!", 0},
39 {"u-7FF is valid", "\xdf\xbf!", 1},
40 {"u-FFFF is a control character", "\xef\xbf\xbf!", 0},
41 {"u-1FFFFF is too large", "\xf7\xbf\xbf\xbf!", 0},
42 {"u-3FFFFFF is 5 bytes", "\xfb\xbf\xbf\xbf\xbf!", 0},
43 {"u-7FFFFFFF is 6 bytes", "\xfd\xbf\xbf\xbf\xbf\xbf!", 0},
45 {"u-D7FF", "\xed\x9f\xbf!", 1},
46 {"u-E000", "\xee\x80\x80!", 1},
47 {"u-FFFD", "\xef\xbf\xbd!", 1},
48 {"u-10FFFF", "\xf4\x8f\xbf\xbf!", 1},
49 {"u-110000", "\xf4\x90\x80\x80!", 0},
54 {"2 continuation bytes", "\x80\xbf!", 0},
66 {"32 first bytes of 2-byte sequences {0xc0-0xdf}",
69 {"16 first bytes of 3-byte sequences {0xe0-0xef}",
71 …{"8 first bytes of 4-byte sequences {0xf0-0xf7}", "\xf0 |\xf1 |\xf2 |\xf3 |\xf4 |\xf5 |\xf6 |\xf7 …
72 {"4 first bytes of 5-byte sequences {0xf8-0xfb}", "\xf8 |\xf9 |\xfa |\xfb !", 0},
73 {"2 first bytes of 6-byte sequences {0xfc-0xfd}", "\xfc |\xfd !", 0},
75 {"sequences with last byte missing {u-0}",
77 {"sequences with last byte missing {u-...FF}",
82 {"overlong sequences {u-2f}",
91 {"single UTF-16 surrogates",
94 {"paired UTF-16 surrogates",
108 {"no bom (utf-8)", "Hi is \xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82!", 13},
109 {"bom (utf-8)", "\xef\xbb\xbfHi is \xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82!", 13},
110 …{"bom (utf-16-le)", "\xff\xfeH\x00i\x00 \x00i\x00s\x00 \x00\x1f\x04@\x04""8\x04""2\x04""5\x04""B\x…
111 …{"bom (utf-16-be)", "\xfe\xff\x00H\x00i\x00 \x00i\x00s\x00 \x04\x1f\x04@\x04""8\x04""2\x04""5\x04"…
122 printf("checking utf-8 sequences...\n"); in check_utf8_sequences()
133 yaml_parser_set_input_string(&parser, (unsigned char *)start, end-start); in check_utf8_sequences()
134 result = yaml_parser_update_buffer(&parser, end-start); in check_utf8_sequences()
136 printf("\t\t- "); in check_utf8_sequences()
146 if (parser.problem_value != -1) { in check_utf8_sequences()
161 printf("checking utf-8 sequences: %d fail(s)\n", failed); in check_utf8_sequences()
180 yaml_parser_set_input_string(&parser, (unsigned char *)start, end-start); in check_boms()
181 result = yaml_parser_update_buffer(&parser, end-start); in check_boms()
183 printf("- (reader error: %s at %ld)\n", parser.problem, (long)parser.problem_offset); in check_boms()
188 printf("- (length=%ld while expected length=%d)\n", (long)parser.unread, check); in check_boms()
192 …printf("- (value '%s' does not equal to the original value '%s')\n", parser.buffer.start, bom_orig… in check_boms()
213 unsigned char ch0, ch1; in check_long_utf8() local
214 unsigned char *buffer = (unsigned char *)malloc(3+LONG*2); in check_long_utf8()
221 if (j % 2) { in check_long_utf8()
231 yaml_parser_set_input_string(&parser, buffer, 3+LONG*2); in check_long_utf8()
245 if (k % 2) { in check_long_utf8()
246 ch0 = '\xd0'; in check_long_utf8()
250 ch0 = '\xd0'; in check_long_utf8()
253 if (parser.buffer.pointer[0] != ch0 || parser.buffer.pointer[1] != ch1) { in check_long_utf8()
254 printf("\tincorrect UTF-8 sequence: %X %X instead of %X %X\n", in check_long_utf8()
256 (int)ch0, (int)ch1); in check_long_utf8()
260 parser.buffer.pointer += 2; in check_long_utf8()
261 parser.unread -= 1; in check_long_utf8()
285 unsigned char ch0, ch1; in check_long_utf16() local
286 unsigned char *buffer = (unsigned char *)malloc(2+LONG*2); in check_long_utf16()
292 if (j % 2) { in check_long_utf16()
302 yaml_parser_set_input_string(&parser, buffer, 2+LONG*2); in check_long_utf16()
316 if (k % 2) { in check_long_utf16()
317 ch0 = '\xd0'; in check_long_utf16()
321 ch0 = '\xd0'; in check_long_utf16()
324 if (parser.buffer.pointer[0] != ch0 || parser.buffer.pointer[1] != ch1) { in check_long_utf16()
325 printf("\tincorrect UTF-8 sequence: %X %X instead of %X %X\n", in check_long_utf16()
327 (int)ch0, (int)ch1); in check_long_utf16()
331 parser.buffer.pointer += 2; in check_long_utf16()
332 parser.unread -= 1; in check_long_utf16()