regex test: do not assert that system PCRE still has an 8.31 bug
[glib.git] / tests / utf8.txt
blob194d1b53297ef64e9859a1afad8e42ed6051225f
1 # This file is derived from 
3 #    http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
4 #    
5 # Which was created by   Markus Kuhn <mkuhn@acm.org> - 2000-09-02 
7 # lines begining with # and blank lines are ignored
9 # Beyond that, this file consists of a series of test cases. Each test case consists of
10 # 2 or 3 lines:
12 #  1. A UTF-8 string
13 #  2. A status
14 #      VALID      : The string is a valid UTF-8 representation of valid Unicode
15 #      INCOMPLETE : The string has a partial character at the end
16 #      NOTUNICODE : The string is valid UTF-8, but the characters represented
17 #                   are not valid unicode (
18 #      OVERLONG   : The string includes overlong sequences
19 #      MALFORMED  : The string is not valid UTF-8
20 # 3. If the status is VALID or NOTUNICODE, the UCS-4 representation of the string,
21 #    as a series of hex numbers.
23 # 1  Some correct UTF-8 text
24 κόσμε
25 VALID
26 03ba 1f79 03c3 03bc 03b5
28 # 2.1  First possible sequence of a certain length
30 # FIXME - handle NULLS?
32 # [ NULL BYTE ]
33 #VALID
34 #0000
37 VALID
38 0080
40
41 VALID
42 0800
44 𐀀
45 VALID
46 00010000
49 NOTUNICODE
50 00200000
53 NOTUNICODE
54 04000000
56 \x7f
57 VALID
58 0000007f
61 VALID
62 000007ff
64 ￿
65 VALID
66 0000ffff
69 NOTUNICODE
70 001fffff
73 NOTUNICODE
74 03ffffff
77 NOTUNICODE
78 7fffffff
80 # 2.3  Other boundary conditions
82
83 VALID
84 d7ff
86
87 VALID
88 e000
90
91 VALID
92 fffd
94 􏿽
95 VALID
96 0010fffd
98 􏿿
99 VALID
100 0010ffff
103 NOTUNICODE
104 00110000
106 # 3.1  Unexpected continuation bytes
109 MALFORMED
111 MALFORMED
112 €¿
113 MALFORMED
114 €¿€
115 MALFORMED
116 €¿€¿
117 MALFORMED
118 €¿€¿€
119 MALFORMED
120 €¿€¿€¿
121 MALFORMED
122 €¿€¿€¿€
123 MALFORMED
124 €�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿
125 MALFORMED
127 # 3.2  Lonely start characters
129 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß 
130 MALFORMED
131 à á â ã ä å æ ç è é ê ë ì í î ï 
132 MALFORMED
133 ð ñ ò ó ô õ ö ÷ 
134 MALFORMED
135 ø ù ú û 
136 MALFORMED
137 ü ý 
138 MALFORMED
140 # 3.3  Sequences with last continuation byte missing
143 INCOMPLETE
144 à€
145 INCOMPLETE
146 ð€€
147 INCOMPLETE
148 ø€€€
149 INCOMPLETE
150 ü€€€€
151 INCOMPLETE
153 INCOMPLETE
154 ï¿
155 INCOMPLETE
156 ÷¿¿
157 INCOMPLETE
158 û¿¿¿
159 INCOMPLETE
160 ý¿¿¿¿
161 INCOMPLETE
163 # 3.4  Concatenation of incomplete sequences
165 Àà€ð€€ø€€€ü€€€€ßï¿÷¿¿û¿¿¿ý¿¿¿¿
166 MALFORMED
168 # 3.5  Impossible bytes
171 MALFORMED
173 MALFORMED
174 þþÿÿ
175 MALFORMED
177 #  Examples of an overlong ASCII character
179 À¯
180 OVERLONG
181 à€¯
182 OVERLONG
183 ð€€¯
184 OVERLONG
185 ø€€€¯
186 OVERLONG
187 ü€€€€¯
188 OVERLONG
190 #  Maximum overlong sequences
192 Á¿
193 OVERLONG
194 àŸ¿
195 OVERLONG
196 �
197 OVERLONG
198 ø‡¿¿¿
199 OVERLONG
200 üƒ¿¿¿¿
201 OVERLONG
203 # Overlong representation of the NUL character
205 
206 OVERLONG
207 à€€
208 OVERLONG
209 ð€€€
210 OVERLONG
211 ø€€€€
212 OVERLONG
213 ü€€€€€
214 OVERLONG
216 # Illegal code positions
218 # Single UTF-16 surrogates
221 NOTUNICODE
222 d800
225 NOTUNICODE
226 db7f
229 NOTUNICODE
230 db80
233 NOTUNICODE
234 dbff
237 NOTUNICODE
238 dc00
241 NOTUNICODE
242 df80
245 NOTUNICODE
246 dfff
248 # Paired UTF-16 surrogates
251 NOTUNICODE
252 d800 dc00
255 NOTUNICODE
256 d800 dfff
259 NOTUNICODE
260 db7f dc00
263 NOTUNICODE
264 db7f dfff
267 NOTUNICODE
268 db80 dc00
271 NOTUNICODE
272 db80 dfff
275 NOTUNICODE
276 dbff dc00
279 NOTUNICODE
280 dbff dfff
282 ################
284 # Some more tests, not from Markus Kuhn's file
287 # Mixed plane 0 and higher planes
289 A𐀀B􏿽C
290 VALID
291 41 00010000 42 10fffd 43