move $enable_debug down below checks for GCC to avoid setting CFLAGS
[platform/upstream/glib.git] / tests / utf8.txt
1 # This file is derived from 
2 #
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 
6 #
7 # lines begining with # and blank lines are ignored
8 #
9 # Beyond that, this file consists of a series of test cases. Each test case consists of
10 # 2 or 3 lines:
11 #
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.
22
23 # 1  Some correct UTF-8 text
24 κόσμε
25 VALID
26 03ba 1f79 03c3 03bc 03b5
27
28 # 2.1  First possible sequence of a certain length
29 #
30 # FIXME - handle NULLS?
31 #
32 # [ NULL BYTE ]
33 #VALID
34 #0000
35
36 \80
37 VALID
38 0080
39
40
41 VALID
42 0800
43
44 𐀀
45 VALID
46 00010000
47
48
49 NOTUNICODE
50 00200000
51
52
53 NOTUNICODE
54 04000000
55
56 \7f
57 VALID
58 0000007f
59
60 ߿
61 VALID
62 000007ff
63
64 ￿
65 NOTUNICODE
66 0000ffff
67
68
69 NOTUNICODE
70 001fffff
71
72
73 NOTUNICODE
74 03ffffff
75
76
77 NOTUNICODE
78 7fffffff
79
80 # 2.3  Other boundary conditions
81
82
83 VALID
84 d7ff
85
86
87 VALID
88 e000
89
90
91 VALID
92 fffd
93
94 􏿿
95 VALID
96 0010ffff
97
98
99 NOTUNICODE
100 00110000
101
102 # 3.1  Unexpected continuation bytes
103
104 \80
105 MALFORMED
106 ¿
107 MALFORMED
108 \80¿
109 MALFORMED
110 \80¿\80
111 MALFORMED
112 \80¿\80¿
113 MALFORMED
114 \80¿\80¿\80
115 MALFORMED
116 \80¿\80¿\80¿
117 MALFORMED
118 \80¿\80¿\80¿\80
119 MALFORMED
120 \80\81\82\83\84\85\86\87\88\89\8a\8b\8c\8d\8e\8f\90\91\92\93\94\95\96\97\98\99\9a\9b\9c\9d\9e\9f¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿
121 MALFORMED
122
123 # 3.2  Lonely start characters
124
125 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß 
126 MALFORMED
127 à á â ã ä å æ ç è é ê ë ì í î ï 
128 MALFORMED
129 ð ñ ò ó ô õ ö ÷ 
130 MALFORMED
131 ø ù ú û 
132 MALFORMED
133 ü ý 
134 MALFORMED
135
136 # 3.3  Sequences with last continuation byte missing
137
138 À
139 INCOMPLETE
140 à\80
141 INCOMPLETE
142 ð\80\80
143 INCOMPLETE
144 ø\80\80\80
145 INCOMPLETE
146 ü\80\80\80\80
147 INCOMPLETE
148 ß
149 INCOMPLETE
150 ï¿
151 INCOMPLETE
152 ÷¿¿
153 INCOMPLETE
154 û¿¿¿
155 INCOMPLETE
156 ý¿¿¿¿
157 INCOMPLETE
158
159 # 3.4  Concatenation of incomplete sequences
160
161 Àà\80ð\80\80ø\80\80\80ü\80\80\80\80ßï¿÷¿¿û¿¿¿ý¿¿¿¿
162 MALFORMED
163
164 # 3.5  Impossible bytes
165
166 þ
167 MALFORMED
168 ÿ
169 MALFORMED
170 þþÿÿ
171 MALFORMED
172
173 #  Examples of an overlong ASCII character
174
175 À¯
176 OVERLONG
177 à\80¯
178 OVERLONG
179 ð\80\80¯
180 OVERLONG
181 ø\80\80\80¯
182 OVERLONG
183 ü\80\80\80\80¯
184 OVERLONG
185
186 #  Maximum overlong sequences
187
188 Á¿
189 OVERLONG
190 à\9f¿
191 OVERLONG
192 ð\8f¿¿
193 OVERLONG
194 ø\87¿¿¿
195 OVERLONG
196 ü\83¿¿¿¿
197 OVERLONG
198
199 # Overlong representation of the NUL character
200
201 À\80
202 OVERLONG
203 à\80\80
204 OVERLONG
205 ð\80\80\80
206 OVERLONG
207 ø\80\80\80\80
208 OVERLONG
209 ü\80\80\80\80\80
210 OVERLONG
211
212 # Illegal code positions
213
214 # Single UTF-16 surrogates
215
216
217 NOTUNICODE
218 d800
219
220
221 NOTUNICODE
222 db7f
223
224
225 NOTUNICODE
226 db80
227
228
229 NOTUNICODE
230 dbff
231
232
233 NOTUNICODE
234 dc00
235
236
237 NOTUNICODE
238 df80
239
240
241 NOTUNICODE
242 dfff
243
244 # Paired UTF-16 surrogates
245
246
247 NOTUNICODE
248 d800 dc00
249
250
251 NOTUNICODE
252 d800 dfff
253
254
255 NOTUNICODE
256 db7f dc00
257
258
259 NOTUNICODE
260 db7f dfff
261
262
263 NOTUNICODE
264 db80 dc00
265
266
267 NOTUNICODE
268 db80 dfff
269
270
271 NOTUNICODE
272 dbff dc00
273
274
275 NOTUNICODE
276 dbff dfff
277
278 # Other illegal code positions
279
280
281 NOTUNICODE
282 fffe
283
284 ￿
285 NOTUNICODE
286 ffff
287
288 ################
289 #
290 # Some more tests, not from Markus Kuhn's file
291 #
292
293 # Mixed plane 0 and higher planes
294
295 A𐀀B􏿿C
296 VALID
297 41 00010000 42 10ffff 43