xref: /illumos-gate/usr/src/lib/iconv_modules/utf-8/common/binarytables/srcs/UTF-8+IBM-871.src (revision 1edba515a3484e0f74b638b203d462b3112ac84d)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 *  ICU License - ICU 1.8.1 and later
23 *
24 *  COPYRIGHT AND PERMISSION NOTICE
25 *
26 * Copyright (c) 1995-2005 International Business Machines Corporation and others
27 * All rights reserved.
28 *
29 * Permission is hereby granted, free of charge, to any person obtaining a
30 * copy of this software and associated documentation files (the
31 * "Software"), to deal in the Software without restriction, including
32 * without limitation the rights to use, copy, modify, merge, publish,
33 * distribute, and/or sell copies of the Software, and to permit persons
34 * to whom the Software is furnished to do so, provided that the above
35 * copyright notice(s) and this permission notice appear in all copies of
36 * the Software and that both the above copyright notice(s) and this
37 * permission notice appear in supporting documentation.
38 *
39 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
40 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
42 * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
43 * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
44 * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
45 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
46 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
47 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
48 *
49 * Except as contained in this notice, the name of a copyright holder
50 * shall not be used in advertising or otherwise to promote the sale, use
51 * or other dealings in this Software without prior written authorization
52 * of the copyright holder.
53 *
54 * --------------------------------------------------------------------------
55 * All trademarks and registered trademarks mentioned herein are the property
56 * of their respective owners.
57 */
58
59//
60// Copyright (c) 2000 by Sun Microsystems, Inc.
61// All rights reserved.
62//
63//
64
65#include <sys/errno.h>
66
67UTF-8%IBM-871 {
68    direction {
69	condition {
70		inputsize >= 1;
71		between 0x0...0x7f;
72	} map {
73		0x00	0x00	// U+0000
74		0x01	0x01	// U+0001
75		0x02	0x02	// U+0002
76		0x03	0x03	// U+0003
77		0x04	0x37	// U+0004
78		0x05	0x2d	// U+0005
79		0x06	0x2e	// U+0006
80		0x07	0x2f	// U+0007
81		0x08	0x16	// U+0008
82		0x09	0x05	// U+0009
83		0x0a	0x25	// U+000a
84		0x0b	0x0b	// U+000B
85		0x0c	0x0c	// U+000c
86		0x0d	0x0d	// U+000d
87		0x0e	0x0e	// U+000E
88		0x0f	0x0f	// U+000F
89		0x10	0x10	// U+0010
90		0x11	0x11	// U+0011
91		0x12	0x12	// U+0012
92		0x13	0x13	// U+0013
93		0x14	0x3c	// U+0014
94		0x15	0x3d	// U+0015
95		0x16	0x32	// U+0016
96		0x17	0x26	// U+0017
97		0x18	0x18	// U+0018
98		0x19	0x19	// U+0019
99		0x1a	0x3f	// U+001A
100		0x1b	0x27	// U+001B
101		0x1c	0x1c	// U+001C
102		0x1d	0x1d	// U+001D
103		0x1e	0x1e	// U+001E
104		0x1f	0x1f	// U+001F
105		0x20	0x40	// U+0020
106		0x21	0x4f	// U+0021
107		0x22	0x7f	// U+0022
108		0x23	0x7b	// U+0023
109		0x24	0x5b	// U+0024
110		0x25	0x6c	// U+0025
111		0x26	0x50	// U+0026
112		0x27	0x7d	// U+0027
113		0x28	0x4d	// U+0028
114		0x29	0x5d	// U+0029
115		0x2a	0x5c	// U+002A
116		0x2b	0x4e	// U+002B
117		0x2c	0x6b	// U+002C
118		0x2d	0x60	// U+002D
119		0x2e	0x4b	// U+002E
120		0x2f	0x61	// U+002F
121		0x30	0xf0	// U+0030
122		0x31	0xf1	// U+0031
123		0x32	0xf2	// U+0032
124		0x33	0xf3	// U+0033
125		0x34	0xf4	// U+0034
126		0x35	0xf5	// U+0035
127		0x36	0xf6	// U+0036
128		0x37	0xf7	// U+0037
129		0x38	0xf8	// U+0038
130		0x39	0xf9	// U+0039
131		0x3a	0x7a	// U+003A
132		0x3b	0x5e	// U+003B
133		0x3c	0x4c	// U+003C
134		0x3d	0x7e	// U+003D
135		0x3e	0x6e	// U+003E
136		0x3f	0x6f	// U+003F
137		0x40	0xac	// U+0040
138		0x41	0xc1	// U+0041
139		0x42	0xc2	// U+0042
140		0x43	0xc3	// U+0043
141		0x44	0xc4	// U+0044
142		0x45	0xc5	// U+0045
143		0x46	0xc6	// U+0046
144		0x47	0xc7	// U+0047
145		0x48	0xc8	// U+0048
146		0x49	0xc9	// U+0049
147		0x4a	0xd1	// U+004A
148		0x4b	0xd2	// U+004B
149		0x4c	0xd3	// U+004C
150		0x4d	0xd4	// U+004D
151		0x4e	0xd5	// U+004E
152		0x4f	0xd6	// U+004F
153		0x50	0xd7	// U+0050
154		0x51	0xd8	// U+0051
155		0x52	0xd9	// U+0052
156		0x53	0xe2	// U+0053
157		0x54	0xe3	// U+0054
158		0x55	0xe4	// U+0055
159		0x56	0xe5	// U+0056
160		0x57	0xe6	// U+0057
161		0x58	0xe7	// U+0058
162		0x59	0xe8	// U+0059
163		0x5a	0xe9	// U+005A
164		0x5b	0xae	// U+005B
165		0x5c	0xbe	// U+005c
166		0x5d	0x9e	// U+005D
167		0x5e	0xec	// U+005E
168		0x5f	0x6d	// U+005F
169		0x60	0x8c	// U+0060
170		0x61	0x81	// U+0061
171		0x62	0x82	// U+0062
172		0x63	0x83	// U+0063
173		0x64	0x84	// U+0064
174		0x65	0x85	// U+0065
175		0x66	0x86	// U+0066
176		0x67	0x87	// U+0067
177		0x68	0x88	// U+0068
178		0x69	0x89	// U+0069
179		0x6a	0x91	// U+006A
180		0x6b	0x92	// U+006B
181		0x6c	0x93	// U+006C
182		0x6d	0x94	// U+006D
183		0x6e	0x95	// U+006E
184		0x6f	0x96	// U+006F
185		0x70	0x97	// U+0070
186		0x71	0x98	// U+0071
187		0x72	0x99	// U+0072
188		0x73	0xa2	// U+0073
189		0x74	0xa3	// U+0074
190		0x75	0xa4	// U+0075
191		0x76	0xa5	// U+0076
192		0x77	0xa6	// U+0077
193		0x78	0xa7	// U+0078
194		0x79	0xa8	// U+0079
195		0x7a	0xa9	// U+007A
196		0x7b	0x8e	// U+007B
197		0x7c	0xbb	// U+007C
198		0x7d	0x9c	// U+007D
199		0x7e	0xcc	// U+007E
200		0x7f	0x07	// U+007F
201
202		default	0x6f
203	};
204
205	condition {
206		inputsize <= 1;
207		between 0xc0...0xfd;
208	} operation {
209		error	EINVAL;
210	};
211
212	condition {
213		inputsize >= 2;
214		between 0xc080...0xdfbf;
215	} map {
216		0xc280	0x20	// U+0080
217		0xc281	0x21	// U+0081
218		0xc282	0x22	// U+0082
219		0xc283	0x23	// U+0083
220		0xc284	0x24	// U+0084
221		0xc285	0x15	// U+0085
222		0xc286	0x06	// U+0086
223		0xc287	0x17	// U+0087
224		0xc288	0x28	// U+0088
225		0xc289	0x29	// U+0089
226		0xc28a	0x2a	// U+008A
227		0xc28b	0x2b	// U+008B
228		0xc28c	0x2c	// U+008C
229		0xc28d	0x09	// U+008D
230		0xc28e	0x0a	// U+008E
231		0xc28f	0x1b	// U+008F
232		0xc290	0x30	// U+0090
233		0xc291	0x31	// U+0091
234		0xc292	0x1a	// U+0092
235		0xc293	0x33	// U+0093
236		0xc294	0x34	// U+0094
237		0xc295	0x35	// U+0095
238		0xc296	0x36	// U+0096
239		0xc297	0x08	// U+0097
240		0xc298	0x38	// U+0098
241		0xc299	0x39	// U+0099
242		0xc29a	0x3a	// U+009A
243		0xc29b	0x3b	// U+009B
244		0xc29c	0x04	// U+009C
245		0xc29d	0x14	// U+009D
246		0xc29e	0x3e	// U+009E
247		0xc29f	0xff	// U+009F
248		0xc2a0	0x41	// U+00A0
249		0xc2a1	0xaa	// U+00A1
250		0xc2a2	0xb0	// U+00A2
251		0xc2a3	0xb1	// U+00A3
252		0xc2a4	0x9f	// U+00A4
253		0xc2a5	0xb2	// U+00A5
254		0xc2a6	0x6a	// U+00A6
255		0xc2a7	0xb5	// U+00A7
256		0xc2a8	0xbd	// U+00A8
257		0xc2a9	0xb4	// U+00A9
258		0xc2aa	0x9a	// U+00AA
259		0xc2ab	0x8a	// U+00AB
260		0xc2ac	0xba	// U+00AC
261		0xc2ad	0xca	// U+00AD
262		0xc2ae	0xaf	// U+00AE
263		0xc2af	0xbc	// U+00AF
264		0xc2b0	0x90	// U+00B0
265		0xc2b1	0x8f	// U+00B1
266		0xc2b2	0xea	// U+00B2
267		0xc2b3	0xfa	// U+00B3
268		0xc2b4	0xe0	// U+00B4
269		0xc2b5	0xa0	// U+00B5
270		0xc2b6	0xb6	// U+00B6
271		0xc2b7	0xb3	// U+00B7
272		0xc2b8	0x9d	// U+00B8
273		0xc2b9	0xda	// U+00B9
274		0xc2ba	0x9b	// U+00BA
275		0xc2bb	0x8b	// U+00BB
276		0xc2bc	0xb7	// U+00BC
277		0xc2bd	0xb8	// U+00BD
278		0xc2be	0xb9	// U+00BE
279		0xc2bf	0xab	// U+00BF
280		0xc380	0x64	// U+00C0
281		0xc381	0x65	// U+00C1
282		0xc382	0x62	// U+00C2
283		0xc383	0x66	// U+00C3
284		0xc384	0x63	// U+00C4
285		0xc385	0x67	// U+00C5
286		0xc386	0x5a	// U+00C6
287		0xc387	0x68	// U+00C7
288		0xc388	0x74	// U+00C8
289		0xc389	0x71	// U+00C9
290		0xc38a	0x72	// U+00CA
291		0xc38b	0x73	// U+00CB
292		0xc38c	0x78	// U+00CC
293		0xc38d	0x75	// U+00CD
294		0xc38e	0x76	// U+00CE
295		0xc38f	0x77	// U+00CF
296		0xc390	0x7c	// U+00D0
297		0xc391	0x69	// U+00D1
298		0xc392	0xed	// U+00D2
299		0xc393	0xee	// U+00D3
300		0xc394	0xeb	// U+00D4
301		0xc395	0xef	// U+00D5
302		0xc396	0x5f	// U+00D6
303		0xc397	0xbf	// U+00D7
304		0xc398	0x80	// U+00D8
305		0xc399	0xfd	// U+00D9
306		0xc39a	0xfe	// U+00DA
307		0xc39b	0xfb	// U+00DB
308		0xc39c	0xfc	// U+00DC
309		0xc39d	0xad	// U+00DD
310		0xc39e	0x4a	// U+00DE
311		0xc39f	0x59	// U+00DF
312		0xc3a0	0x44	// U+00E0
313		0xc3a1	0x45	// U+00E1
314		0xc3a2	0x42	// U+00E2
315		0xc3a3	0x46	// U+00E3
316		0xc3a4	0x43	// U+00E4
317		0xc3a5	0x47	// U+00E5
318		0xc3a6	0xd0	// U+00E6
319		0xc3a7	0x48	// U+00E7
320		0xc3a8	0x54	// U+00E8
321		0xc3a9	0x51	// U+00E9
322		0xc3aa	0x52	// U+00EA
323		0xc3ab	0x53	// U+00EB
324		0xc3ac	0x58	// U+00EC
325		0xc3ad	0x55	// U+00ED
326		0xc3ae	0x56	// U+00EE
327		0xc3af	0x57	// U+00EF
328		0xc3b0	0x79	// U+00F0
329		0xc3b1	0x49	// U+00F1
330		0xc3b2	0xcd	// U+00F2
331		0xc3b3	0xce	// U+00F3
332		0xc3b4	0xcb	// U+00F4
333		0xc3b5	0xcf	// U+00F5
334		0xc3b6	0xa1	// U+00F6
335		0xc3b7	0xe1	// U+00F7
336		0xc3b8	0x70	// U+00F8
337		0xc3b9	0xdd	// U+00F9
338		0xc3ba	0xde	// U+00FA
339		0xc3bb	0xdb	// U+00FB
340		0xc3bc	0xdc	// U+00FC
341		0xc3bd	0x8d	// U+00FD
342		0xc3be	0xc0	// U+00FE
343		0xc3bf	0xdf	// U+00FF
344
345		default	0x6f
346	};
347
348	condition {
349		inputsize <= 2;
350		between 0xe0...0xfd;
351	} operation {
352		error	EINVAL;
353	};
354
355	condition {
356		inputsize >= 3;
357		between 0xe08080...0xecbfbf, 0xed8080...0xed9fbf, 0xee8080...0xefbfbf;
358	} operation {
359		if (input == 0xefbfbe || input == 0xefbfbf) {
360			error EILSEQ;
361		};
362		output = 0x6f;
363		discard 3;
364	};
365
366	condition {
367		inputsize <= 3;
368		between 0xf0...0xfd;
369	} operation {
370		error	EINVAL;
371	};
372
373        condition {
374                inputsize >= 4;
375                between 0xf0808080...0xf7bfbfbf;
376        } operation {
377                output = 0x6f;
378                discard 4;
379        };
380
381        condition {
382                inputsize <= 4;
383                between 0xf8...0xfd;
384        } operation {
385                error   EINVAL;
386        };
387
388        condition {
389                inputsize >= 5;
390                between 0xf880808080...0xfbbfbfbfbf;
391        } operation {
392                output = 0x6f;
393                discard 5;
394        };
395
396        condition {
397                inputsize <= 5;
398                between 0xfc...0xfd;
399        } operation {
400                error   EINVAL;
401        };
402
403        condition {
404                inputsize >= 6;
405                between 0xfc8080808080...0xfdbfbfbfbfbf;
406        } operation {
407                output = 0x6f;
408                discard 6;
409        };
410
411    };
412}
413