xref: /titanic_50/usr/src/cmd/geniconvtbl/samples/UTF-8_to_ISO8859-1.src (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate// ident	"%Z%%M%	%I%	%E% SMI"
2*7c478bd9Sstevel@tonic-gate// Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3*7c478bd9Sstevel@tonic-gate// Use is subject to license terms.
4*7c478bd9Sstevel@tonic-gate//
5*7c478bd9Sstevel@tonic-gate// CDDL HEADER START
6*7c478bd9Sstevel@tonic-gate//
7*7c478bd9Sstevel@tonic-gate// The contents of this file are subject to the terms of the
8*7c478bd9Sstevel@tonic-gate// Common Development and Distribution License, Version 1.0 only
9*7c478bd9Sstevel@tonic-gate// (the "License").  You may not use this file except in compliance
10*7c478bd9Sstevel@tonic-gate// with the License.
11*7c478bd9Sstevel@tonic-gate//
12*7c478bd9Sstevel@tonic-gate// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13*7c478bd9Sstevel@tonic-gate// or http://www.opensolaris.org/os/licensing.
14*7c478bd9Sstevel@tonic-gate// See the License for the specific language governing permissions
15*7c478bd9Sstevel@tonic-gate// and limitations under the License.
16*7c478bd9Sstevel@tonic-gate//
17*7c478bd9Sstevel@tonic-gate// When distributing Covered Code, include this CDDL HEADER in each
18*7c478bd9Sstevel@tonic-gate// file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19*7c478bd9Sstevel@tonic-gate// If applicable, add the following below this CDDL HEADER, with the
20*7c478bd9Sstevel@tonic-gate// fields enclosed by brackets "[]" replaced with your own identifying
21*7c478bd9Sstevel@tonic-gate// information: Portions Copyright [yyyy] [name of copyright owner]
22*7c478bd9Sstevel@tonic-gate//
23*7c478bd9Sstevel@tonic-gate// CDDL HEADER END
24*7c478bd9Sstevel@tonic-gate//
25*7c478bd9Sstevel@tonic-gate
26*7c478bd9Sstevel@tonic-gate//
27*7c478bd9Sstevel@tonic-gate// UTF-8 to ISO8859-1 mapping:
28*7c478bd9Sstevel@tonic-gate//
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gateUTF-8%ISO8859-1 {
31*7c478bd9Sstevel@tonic-gate    direction {
32*7c478bd9Sstevel@tonic-gate	condition {
33*7c478bd9Sstevel@tonic-gate		between 0x0...0x7f;
34*7c478bd9Sstevel@tonic-gate	} map {
35*7c478bd9Sstevel@tonic-gate		0x0...0x7f	0x0
36*7c478bd9Sstevel@tonic-gate	};
37*7c478bd9Sstevel@tonic-gate
38*7c478bd9Sstevel@tonic-gate	condition {
39*7c478bd9Sstevel@tonic-gate		between 0xc280...0xc3bf;
40*7c478bd9Sstevel@tonic-gate	} map {
41*7c478bd9Sstevel@tonic-gate		0xc280		0x80
42*7c478bd9Sstevel@tonic-gate		0xc281		0x81
43*7c478bd9Sstevel@tonic-gate		0xc282		0x82
44*7c478bd9Sstevel@tonic-gate		0xc283		0x83
45*7c478bd9Sstevel@tonic-gate		0xc284		0x84
46*7c478bd9Sstevel@tonic-gate		0xc285		0x85
47*7c478bd9Sstevel@tonic-gate		0xc286		0x86
48*7c478bd9Sstevel@tonic-gate		0xc287		0x87
49*7c478bd9Sstevel@tonic-gate		0xc288		0x88
50*7c478bd9Sstevel@tonic-gate		0xc289		0x89
51*7c478bd9Sstevel@tonic-gate		0xc28a		0x8a
52*7c478bd9Sstevel@tonic-gate		0xc28b		0x8b
53*7c478bd9Sstevel@tonic-gate		0xc28c		0x8c
54*7c478bd9Sstevel@tonic-gate		0xc28d		0x8d
55*7c478bd9Sstevel@tonic-gate		0xc28e		0x8e
56*7c478bd9Sstevel@tonic-gate		0xc28f		0x8f
57*7c478bd9Sstevel@tonic-gate		0xc290		0x90
58*7c478bd9Sstevel@tonic-gate		0xc291		0x91
59*7c478bd9Sstevel@tonic-gate		0xc292		0x92
60*7c478bd9Sstevel@tonic-gate		0xc293		0x93
61*7c478bd9Sstevel@tonic-gate		0xc294		0x94
62*7c478bd9Sstevel@tonic-gate		0xc295		0x95
63*7c478bd9Sstevel@tonic-gate		0xc296		0x96
64*7c478bd9Sstevel@tonic-gate		0xc297		0x97
65*7c478bd9Sstevel@tonic-gate		0xc298		0x98
66*7c478bd9Sstevel@tonic-gate		0xc299		0x99
67*7c478bd9Sstevel@tonic-gate		0xc29a		0x9a
68*7c478bd9Sstevel@tonic-gate		0xc29b		0x9b
69*7c478bd9Sstevel@tonic-gate		0xc29c		0x9c
70*7c478bd9Sstevel@tonic-gate		0xc29d		0x9d
71*7c478bd9Sstevel@tonic-gate		0xc29e		0x9e
72*7c478bd9Sstevel@tonic-gate		0xc29f		0x9f
73*7c478bd9Sstevel@tonic-gate		0xc2a0		0xa0
74*7c478bd9Sstevel@tonic-gate		0xc2a1		0xa1
75*7c478bd9Sstevel@tonic-gate		0xc2a2		0xa2
76*7c478bd9Sstevel@tonic-gate		0xc2a3		0xa3
77*7c478bd9Sstevel@tonic-gate		0xc2a4		0xa4
78*7c478bd9Sstevel@tonic-gate		0xc2a5		0xa5
79*7c478bd9Sstevel@tonic-gate		0xc2a6		0xa6
80*7c478bd9Sstevel@tonic-gate		0xc2a7		0xa7
81*7c478bd9Sstevel@tonic-gate		0xc2a8		0xa8
82*7c478bd9Sstevel@tonic-gate		0xc2a9		0xa9
83*7c478bd9Sstevel@tonic-gate		0xc2aa		0xaa
84*7c478bd9Sstevel@tonic-gate		0xc2ab		0xab
85*7c478bd9Sstevel@tonic-gate		0xc2ac		0xac
86*7c478bd9Sstevel@tonic-gate		0xc2ad		0xad
87*7c478bd9Sstevel@tonic-gate		0xc2ae		0xae
88*7c478bd9Sstevel@tonic-gate		0xc2af		0xaf
89*7c478bd9Sstevel@tonic-gate		0xc2b0		0xb0
90*7c478bd9Sstevel@tonic-gate		0xc2b1		0xb1
91*7c478bd9Sstevel@tonic-gate		0xc2b2		0xb2
92*7c478bd9Sstevel@tonic-gate		0xc2b3		0xb3
93*7c478bd9Sstevel@tonic-gate		0xc2b4		0xb4
94*7c478bd9Sstevel@tonic-gate		0xc2b5		0xb5
95*7c478bd9Sstevel@tonic-gate		0xc2b6		0xb6
96*7c478bd9Sstevel@tonic-gate		0xc2b7		0xb7
97*7c478bd9Sstevel@tonic-gate		0xc2b8		0xb8
98*7c478bd9Sstevel@tonic-gate		0xc2b9		0xb9
99*7c478bd9Sstevel@tonic-gate		0xc2ba		0xba
100*7c478bd9Sstevel@tonic-gate		0xc2bb		0xbb
101*7c478bd9Sstevel@tonic-gate		0xc2bc		0xbc
102*7c478bd9Sstevel@tonic-gate		0xc2bd		0xbd
103*7c478bd9Sstevel@tonic-gate		0xc2be		0xbe
104*7c478bd9Sstevel@tonic-gate		0xc2bf		0xbf
105*7c478bd9Sstevel@tonic-gate		0xc380		0xc0
106*7c478bd9Sstevel@tonic-gate		0xc381		0xc1
107*7c478bd9Sstevel@tonic-gate		0xc382		0xc2
108*7c478bd9Sstevel@tonic-gate		0xc383		0xc3
109*7c478bd9Sstevel@tonic-gate		0xc384		0xc4
110*7c478bd9Sstevel@tonic-gate		0xc385		0xc5
111*7c478bd9Sstevel@tonic-gate		0xc386		0xc6
112*7c478bd9Sstevel@tonic-gate		0xc387		0xc7
113*7c478bd9Sstevel@tonic-gate		0xc388		0xc8
114*7c478bd9Sstevel@tonic-gate		0xc389		0xc9
115*7c478bd9Sstevel@tonic-gate		0xc38a		0xca
116*7c478bd9Sstevel@tonic-gate		0xc38b		0xcb
117*7c478bd9Sstevel@tonic-gate		0xc38c		0xcc
118*7c478bd9Sstevel@tonic-gate		0xc38d		0xcd
119*7c478bd9Sstevel@tonic-gate		0xc38e		0xce
120*7c478bd9Sstevel@tonic-gate		0xc38f		0xcf
121*7c478bd9Sstevel@tonic-gate		0xc390		0xd0
122*7c478bd9Sstevel@tonic-gate		0xc391		0xd1
123*7c478bd9Sstevel@tonic-gate		0xc392		0xd2
124*7c478bd9Sstevel@tonic-gate		0xc393		0xd3
125*7c478bd9Sstevel@tonic-gate		0xc394		0xd4
126*7c478bd9Sstevel@tonic-gate		0xc395		0xd5
127*7c478bd9Sstevel@tonic-gate		0xc396		0xd6
128*7c478bd9Sstevel@tonic-gate		0xc397		0xd7
129*7c478bd9Sstevel@tonic-gate		0xc398		0xd8
130*7c478bd9Sstevel@tonic-gate		0xc399		0xd9
131*7c478bd9Sstevel@tonic-gate		0xc39a		0xda
132*7c478bd9Sstevel@tonic-gate		0xc39b		0xdb
133*7c478bd9Sstevel@tonic-gate		0xc39c		0xdc
134*7c478bd9Sstevel@tonic-gate		0xc39d		0xdd
135*7c478bd9Sstevel@tonic-gate		0xc39e		0xde
136*7c478bd9Sstevel@tonic-gate		0xc39f		0xdf
137*7c478bd9Sstevel@tonic-gate		0xc3a0		0xe0
138*7c478bd9Sstevel@tonic-gate		0xc3a1		0xe1
139*7c478bd9Sstevel@tonic-gate		0xc3a2		0xe2
140*7c478bd9Sstevel@tonic-gate		0xc3a3		0xe3
141*7c478bd9Sstevel@tonic-gate		0xc3a4		0xe4
142*7c478bd9Sstevel@tonic-gate		0xc3a5		0xe5
143*7c478bd9Sstevel@tonic-gate		0xc3a6		0xe6
144*7c478bd9Sstevel@tonic-gate		0xc3a7		0xe7
145*7c478bd9Sstevel@tonic-gate		0xc3a8		0xe8
146*7c478bd9Sstevel@tonic-gate		0xc3a9		0xe9
147*7c478bd9Sstevel@tonic-gate		0xc3aa		0xea
148*7c478bd9Sstevel@tonic-gate		0xc3ab		0xeb
149*7c478bd9Sstevel@tonic-gate		0xc3ac		0xec
150*7c478bd9Sstevel@tonic-gate		0xc3ad		0xed
151*7c478bd9Sstevel@tonic-gate		0xc3ae		0xee
152*7c478bd9Sstevel@tonic-gate		0xc3af		0xef
153*7c478bd9Sstevel@tonic-gate		0xc3b0		0xf0
154*7c478bd9Sstevel@tonic-gate		0xc3b1		0xf1
155*7c478bd9Sstevel@tonic-gate		0xc3b2		0xf2
156*7c478bd9Sstevel@tonic-gate		0xc3b3		0xf3
157*7c478bd9Sstevel@tonic-gate		0xc3b4		0xf4
158*7c478bd9Sstevel@tonic-gate		0xc3b5		0xf5
159*7c478bd9Sstevel@tonic-gate		0xc3b6		0xf6
160*7c478bd9Sstevel@tonic-gate		0xc3b7		0xf7
161*7c478bd9Sstevel@tonic-gate		0xc3b8		0xf8
162*7c478bd9Sstevel@tonic-gate		0xc3b9		0xf9
163*7c478bd9Sstevel@tonic-gate		0xc3ba		0xfa
164*7c478bd9Sstevel@tonic-gate		0xc3bb		0xfb
165*7c478bd9Sstevel@tonic-gate		0xc3bc		0xfc
166*7c478bd9Sstevel@tonic-gate		0xc3bd		0xfd
167*7c478bd9Sstevel@tonic-gate		0xc3be		0xfe
168*7c478bd9Sstevel@tonic-gate		0xc3bf		0xff
169*7c478bd9Sstevel@tonic-gate	};
170*7c478bd9Sstevel@tonic-gate
171*7c478bd9Sstevel@tonic-gate	// We convert every other character to '?', i.e., non-identical
172*7c478bd9Sstevel@tonic-gate	// character.
173*7c478bd9Sstevel@tonic-gate	true 	operation {
174*7c478bd9Sstevel@tonic-gate		output = 0x3f;
175*7c478bd9Sstevel@tonic-gate		discard 1;
176*7c478bd9Sstevel@tonic-gate	};
177*7c478bd9Sstevel@tonic-gate   };
178*7c478bd9Sstevel@tonic-gate}
179