xref: /illumos-gate/usr/src/lib/iconv_modules/utf-8/common/binarytables/srcs/UTF-8+IBM-1149.src (revision ed093b41a93e8563e6e1e5dae0768dda2a7bcc27)
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// Copyright (c) 2000 by Sun Microsystems, Inc.
60// All rights reserved.
61//
62//
63// This file originally came from UTF-8+IBM-871.src and the only significant
64// change made is a re-mapping of Intl Currency Symbol mapping to euro mapping.
65//
66
67#include <sys/errno.h>
68
69UTF-8%IBM-1149 {
70    direction {
71	condition {
72		inputsize >= 1;
73		between 0x0...0x7f;
74	} map {
75		0x00	0x00	// U+0000
76		0x01	0x01	// U+0001
77		0x02	0x02	// U+0002
78		0x03	0x03	// U+0003
79		0x04	0x37	// U+0004
80		0x05	0x2d	// U+0005
81		0x06	0x2e	// U+0006
82		0x07	0x2f	// U+0007
83		0x08	0x16	// U+0008
84		0x09	0x05	// U+0009
85		0x0a	0x25	// U+000a
86		0x0b	0x0b	// U+000B
87		0x0c	0x0c	// U+000c
88		0x0d	0x0d	// U+000d
89		0x0e	0x0e	// U+000E
90		0x0f	0x0f	// U+000F
91		0x10	0x10	// U+0010
92		0x11	0x11	// U+0011
93		0x12	0x12	// U+0012
94		0x13	0x13	// U+0013
95		0x14	0x3c	// U+0014
96		0x15	0x3d	// U+0015
97		0x16	0x32	// U+0016
98		0x17	0x26	// U+0017
99		0x18	0x18	// U+0018
100		0x19	0x19	// U+0019
101		0x1a	0x3f	// U+001A
102		0x1b	0x27	// U+001B
103		0x1c	0x1c	// U+001C
104		0x1d	0x1d	// U+001D
105		0x1e	0x1e	// U+001E
106		0x1f	0x1f	// U+001F
107		0x20	0x40	// U+0020
108		0x21	0x4f	// U+0021
109		0x22	0x7f	// U+0022
110		0x23	0x7b	// U+0023
111		0x24	0x5b	// U+0024
112		0x25	0x6c	// U+0025
113		0x26	0x50	// U+0026
114		0x27	0x7d	// U+0027
115		0x28	0x4d	// U+0028
116		0x29	0x5d	// U+0029
117		0x2a	0x5c	// U+002A
118		0x2b	0x4e	// U+002B
119		0x2c	0x6b	// U+002C
120		0x2d	0x60	// U+002D
121		0x2e	0x4b	// U+002E
122		0x2f	0x61	// U+002F
123		0x30	0xf0	// U+0030
124		0x31	0xf1	// U+0031
125		0x32	0xf2	// U+0032
126		0x33	0xf3	// U+0033
127		0x34	0xf4	// U+0034
128		0x35	0xf5	// U+0035
129		0x36	0xf6	// U+0036
130		0x37	0xf7	// U+0037
131		0x38	0xf8	// U+0038
132		0x39	0xf9	// U+0039
133		0x3a	0x7a	// U+003A
134		0x3b	0x5e	// U+003B
135		0x3c	0x4c	// U+003C
136		0x3d	0x7e	// U+003D
137		0x3e	0x6e	// U+003E
138		0x3f	0x6f	// U+003F
139		0x40	0xac	// U+0040
140		0x41	0xc1	// U+0041
141		0x42	0xc2	// U+0042
142		0x43	0xc3	// U+0043
143		0x44	0xc4	// U+0044
144		0x45	0xc5	// U+0045
145		0x46	0xc6	// U+0046
146		0x47	0xc7	// U+0047
147		0x48	0xc8	// U+0048
148		0x49	0xc9	// U+0049
149		0x4a	0xd1	// U+004A
150		0x4b	0xd2	// U+004B
151		0x4c	0xd3	// U+004C
152		0x4d	0xd4	// U+004D
153		0x4e	0xd5	// U+004E
154		0x4f	0xd6	// U+004F
155		0x50	0xd7	// U+0050
156		0x51	0xd8	// U+0051
157		0x52	0xd9	// U+0052
158		0x53	0xe2	// U+0053
159		0x54	0xe3	// U+0054
160		0x55	0xe4	// U+0055
161		0x56	0xe5	// U+0056
162		0x57	0xe6	// U+0057
163		0x58	0xe7	// U+0058
164		0x59	0xe8	// U+0059
165		0x5a	0xe9	// U+005A
166		0x5b	0xae	// U+005B
167		0x5c	0xbe	// U+005c
168		0x5d	0x9e	// U+005D
169		0x5e	0xec	// U+005E
170		0x5f	0x6d	// U+005F
171		0x60	0x8c	// U+0060
172		0x61	0x81	// U+0061
173		0x62	0x82	// U+0062
174		0x63	0x83	// U+0063
175		0x64	0x84	// U+0064
176		0x65	0x85	// U+0065
177		0x66	0x86	// U+0066
178		0x67	0x87	// U+0067
179		0x68	0x88	// U+0068
180		0x69	0x89	// U+0069
181		0x6a	0x91	// U+006A
182		0x6b	0x92	// U+006B
183		0x6c	0x93	// U+006C
184		0x6d	0x94	// U+006D
185		0x6e	0x95	// U+006E
186		0x6f	0x96	// U+006F
187		0x70	0x97	// U+0070
188		0x71	0x98	// U+0071
189		0x72	0x99	// U+0072
190		0x73	0xa2	// U+0073
191		0x74	0xa3	// U+0074
192		0x75	0xa4	// U+0075
193		0x76	0xa5	// U+0076
194		0x77	0xa6	// U+0077
195		0x78	0xa7	// U+0078
196		0x79	0xa8	// U+0079
197		0x7a	0xa9	// U+007A
198		0x7b	0x8e	// U+007B
199		0x7c	0xbb	// U+007C
200		0x7d	0x9c	// U+007D
201		0x7e	0xcc	// U+007E
202		0x7f	0x07	// U+007F
203
204		default	0x6f
205	};
206
207	condition {
208		inputsize <= 1;
209		between 0xc0...0xfd;
210	} operation {
211		error	EINVAL;
212	};
213
214	condition {
215		inputsize >= 2;
216		between 0xc080...0xdfbf;
217	} map {
218		0xc280	0x20	// U+0080
219		0xc281	0x21	// U+0081
220		0xc282	0x22	// U+0082
221		0xc283	0x23	// U+0083
222		0xc284	0x24	// U+0084
223		0xc285	0x15	// U+0085
224		0xc286	0x06	// U+0086
225		0xc287	0x17	// U+0087
226		0xc288	0x28	// U+0088
227		0xc289	0x29	// U+0089
228		0xc28a	0x2a	// U+008A
229		0xc28b	0x2b	// U+008B
230		0xc28c	0x2c	// U+008C
231		0xc28d	0x09	// U+008D
232		0xc28e	0x0a	// U+008E
233		0xc28f	0x1b	// U+008F
234		0xc290	0x30	// U+0090
235		0xc291	0x31	// U+0091
236		0xc292	0x1a	// U+0092
237		0xc293	0x33	// U+0093
238		0xc294	0x34	// U+0094
239		0xc295	0x35	// U+0095
240		0xc296	0x36	// U+0096
241		0xc297	0x08	// U+0097
242		0xc298	0x38	// U+0098
243		0xc299	0x39	// U+0099
244		0xc29a	0x3a	// U+009A
245		0xc29b	0x3b	// U+009B
246		0xc29c	0x04	// U+009C
247		0xc29d	0x14	// U+009D
248		0xc29e	0x3e	// U+009E
249		0xc29f	0xff	// U+009F
250		0xc2a0	0x41	// U+00A0
251		0xc2a1	0xaa	// U+00A1
252		0xc2a2	0xb0	// U+00A2
253		0xc2a3	0xb1	// U+00A3
254		0xc2a4	0x9f	// U+00A4
255		0xc2a5	0xb2	// U+00A5
256		0xc2a6	0x6a	// U+00A6
257		0xc2a7	0xb5	// U+00A7
258		0xc2a8	0xbd	// U+00A8
259		0xc2a9	0xb4	// U+00A9
260		0xc2aa	0x9a	// U+00AA
261		0xc2ab	0x8a	// U+00AB
262		0xc2ac	0xba	// U+00AC
263		0xc2ad	0xca	// U+00AD
264		0xc2ae	0xaf	// U+00AE
265		0xc2af	0xbc	// U+00AF
266		0xc2b0	0x90	// U+00B0
267		0xc2b1	0x8f	// U+00B1
268		0xc2b2	0xea	// U+00B2
269		0xc2b3	0xfa	// U+00B3
270		0xc2b4	0xe0	// U+00B4
271		0xc2b5	0xa0	// U+00B5
272		0xc2b6	0xb6	// U+00B6
273		0xc2b7	0xb3	// U+00B7
274		0xc2b8	0x9d	// U+00B8
275		0xc2b9	0xda	// U+00B9
276		0xc2ba	0x9b	// U+00BA
277		0xc2bb	0x8b	// U+00BB
278		0xc2bc	0xb7	// U+00BC
279		0xc2bd	0xb8	// U+00BD
280		0xc2be	0xb9	// U+00BE
281		0xc2bf	0xab	// U+00BF
282		0xc380	0x64	// U+00C0
283		0xc381	0x65	// U+00C1
284		0xc382	0x62	// U+00C2
285		0xc383	0x66	// U+00C3
286		0xc384	0x63	// U+00C4
287		0xc385	0x67	// U+00C5
288		0xc386	0x5a	// U+00C6
289		0xc387	0x68	// U+00C7
290		0xc388	0x74	// U+00C8
291		0xc389	0x71	// U+00C9
292		0xc38a	0x72	// U+00CA
293		0xc38b	0x73	// U+00CB
294		0xc38c	0x78	// U+00CC
295		0xc38d	0x75	// U+00CD
296		0xc38e	0x76	// U+00CE
297		0xc38f	0x77	// U+00CF
298		0xc390	0x7c	// U+00D0
299		0xc391	0x69	// U+00D1
300		0xc392	0xed	// U+00D2
301		0xc393	0xee	// U+00D3
302		0xc394	0xeb	// U+00D4
303		0xc395	0xef	// U+00D5
304		0xc396	0x5f	// U+00D6
305		0xc397	0xbf	// U+00D7
306		0xc398	0x80	// U+00D8
307		0xc399	0xfd	// U+00D9
308		0xc39a	0xfe	// U+00DA
309		0xc39b	0xfb	// U+00DB
310		0xc39c	0xfc	// U+00DC
311		0xc39d	0xad	// U+00DD
312		0xc39e	0x4a	// U+00DE
313		0xc39f	0x59	// U+00DF
314		0xc3a0	0x44	// U+00E0
315		0xc3a1	0x45	// U+00E1
316		0xc3a2	0x42	// U+00E2
317		0xc3a3	0x46	// U+00E3
318		0xc3a4	0x43	// U+00E4
319		0xc3a5	0x47	// U+00E5
320		0xc3a6	0xd0	// U+00E6
321		0xc3a7	0x48	// U+00E7
322		0xc3a8	0x54	// U+00E8
323		0xc3a9	0x51	// U+00E9
324		0xc3aa	0x52	// U+00EA
325		0xc3ab	0x53	// U+00EB
326		0xc3ac	0x58	// U+00EC
327		0xc3ad	0x55	// U+00ED
328		0xc3ae	0x56	// U+00EE
329		0xc3af	0x57	// U+00EF
330		0xc3b0	0x79	// U+00F0
331		0xc3b1	0x49	// U+00F1
332		0xc3b2	0xcd	// U+00F2
333		0xc3b3	0xce	// U+00F3
334		0xc3b4	0xcb	// U+00F4
335		0xc3b5	0xcf	// U+00F5
336		0xc3b6	0xa1	// U+00F6
337		0xc3b7	0xe1	// U+00F7
338		0xc3b8	0x70	// U+00F8
339		0xc3b9	0xdd	// U+00F9
340		0xc3ba	0xde	// U+00FA
341		0xc3bb	0xdb	// U+00FB
342		0xc3bc	0xdc	// U+00FC
343		0xc3bd	0x8d	// U+00FD
344		0xc3be	0xc0	// U+00FE
345		0xc3bf	0xdf	// U+00FF
346
347		default	0x6f
348	};
349
350	condition {
351		inputsize <= 2;
352		between 0xe0...0xfd;
353	} operation {
354		error	EINVAL;
355	};
356
357	condition {
358		inputsize >= 3;
359		between 0xe08080...0xecbfbf, 0xed8080...0xed9fbf, 0xee8080...0xefbfbf;
360	} operation {
361		if (input == 0xefbfbe || input == 0xefbfbf) {
362			error EILSEQ;
363		} else if (input == 0xe282ac) { // euro sign?
364			output = 0x9f;
365		} else {
366			output = 0x6f;
367		};
368		discard 3;
369	};
370
371	condition {
372		inputsize <= 3;
373		between 0xf0...0xfd;
374	} operation {
375		error	EINVAL;
376	};
377
378        condition {
379                inputsize >= 4;
380                between 0xf0808080...0xf7bfbfbf;
381        } operation {
382                output = 0x6f;
383                discard 4;
384        };
385
386        condition {
387                inputsize <= 4;
388                between 0xf8...0xfd;
389        } operation {
390                error   EINVAL;
391        };
392
393        condition {
394                inputsize >= 5;
395                between 0xf880808080...0xfbbfbfbfbf;
396        } operation {
397                output = 0x6f;
398                discard 5;
399        };
400
401        condition {
402                inputsize <= 5;
403                between 0xfc...0xfd;
404        } operation {
405                error   EINVAL;
406        };
407
408        condition {
409                inputsize >= 6;
410                between 0xfc8080808080...0xfdbfbfbfbfbf;
411        } operation {
412                output = 0x6f;
413                discard 6;
414        };
415
416    };
417}
418