1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright (c) 2001 by Sun Microsystems, Inc.
3*7c478bd9Sstevel@tonic-gate  * All rights reserved.
4*7c478bd9Sstevel@tonic-gate  */
5*7c478bd9Sstevel@tonic-gate 
6*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
7*7c478bd9Sstevel@tonic-gate 
8*7c478bd9Sstevel@tonic-gate /*
9*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the Netscape Public
10*7c478bd9Sstevel@tonic-gate  * License Version 1.1 (the "License"); you may not use this file
11*7c478bd9Sstevel@tonic-gate  * except in compliance with the License. You may obtain a copy of
12*7c478bd9Sstevel@tonic-gate  * the License at http://www.mozilla.org/NPL/
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * Software distributed under the License is distributed on an "AS
15*7c478bd9Sstevel@tonic-gate  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
16*7c478bd9Sstevel@tonic-gate  * implied. See the License for the specific language governing
17*7c478bd9Sstevel@tonic-gate  * rights and limitations under the License.
18*7c478bd9Sstevel@tonic-gate  *
19*7c478bd9Sstevel@tonic-gate  * The Original Code is Mozilla Communicator client code, released
20*7c478bd9Sstevel@tonic-gate  * March 31, 1998.
21*7c478bd9Sstevel@tonic-gate  *
22*7c478bd9Sstevel@tonic-gate  * The Initial Developer of the Original Code is Netscape
23*7c478bd9Sstevel@tonic-gate  * Communications Corporation. Portions created by Netscape are
24*7c478bd9Sstevel@tonic-gate  * Copyright (C) 1998-1999 Netscape Communications Corporation. All
25*7c478bd9Sstevel@tonic-gate  * Rights Reserved.
26*7c478bd9Sstevel@tonic-gate  *
27*7c478bd9Sstevel@tonic-gate  * Contributor(s):
28*7c478bd9Sstevel@tonic-gate  */
29*7c478bd9Sstevel@tonic-gate /*
30*7c478bd9Sstevel@tonic-gate  *  Copyright (c) 1995 Regents of the University of Michigan.
31*7c478bd9Sstevel@tonic-gate  *  All rights reserved.
32*7c478bd9Sstevel@tonic-gate  */
33*7c478bd9Sstevel@tonic-gate /*
34*7c478bd9Sstevel@tonic-gate  *  charset.c
35*7c478bd9Sstevel@tonic-gate  */
36*7c478bd9Sstevel@tonic-gate 
37*7c478bd9Sstevel@tonic-gate #include "ldap-int.h"
38*7c478bd9Sstevel@tonic-gate 
39*7c478bd9Sstevel@tonic-gate #ifdef STR_TRANSLATION
40*7c478bd9Sstevel@tonic-gate 
41*7c478bd9Sstevel@tonic-gate void
ldap_set_string_translators(LDAP * ld,BERTranslateProc encode_proc,BERTranslateProc decode_proc)42*7c478bd9Sstevel@tonic-gate ldap_set_string_translators( LDAP *ld, BERTranslateProc encode_proc,
43*7c478bd9Sstevel@tonic-gate 	BERTranslateProc decode_proc )
44*7c478bd9Sstevel@tonic-gate {
45*7c478bd9Sstevel@tonic-gate 	if ( ld == NULL ) {
46*7c478bd9Sstevel@tonic-gate 		if ( !nsldapi_initialized ) {
47*7c478bd9Sstevel@tonic-gate 			nsldapi_initialize_defaults();
48*7c478bd9Sstevel@tonic-gate 		}
49*7c478bd9Sstevel@tonic-gate 		ld = &nsldapi_ld_defaults;
50*7c478bd9Sstevel@tonic-gate 	}
51*7c478bd9Sstevel@tonic-gate 
52*7c478bd9Sstevel@tonic-gate 	if ( NSLDAPI_VALID_LDAP_POINTER( ld )) {
53*7c478bd9Sstevel@tonic-gate 		ld->ld_lber_encode_translate_proc = encode_proc;
54*7c478bd9Sstevel@tonic-gate 		ld->ld_lber_decode_translate_proc = decode_proc;
55*7c478bd9Sstevel@tonic-gate 	}
56*7c478bd9Sstevel@tonic-gate }
57*7c478bd9Sstevel@tonic-gate 
58*7c478bd9Sstevel@tonic-gate 
59*7c478bd9Sstevel@tonic-gate void
ldap_enable_translation(LDAP * ld,LDAPMessage * entry,int enable)60*7c478bd9Sstevel@tonic-gate ldap_enable_translation( LDAP *ld, LDAPMessage *entry, int enable )
61*7c478bd9Sstevel@tonic-gate {
62*7c478bd9Sstevel@tonic-gate 	char	*optionsp;
63*7c478bd9Sstevel@tonic-gate 
64*7c478bd9Sstevel@tonic-gate 	if ( ld == NULL ) {
65*7c478bd9Sstevel@tonic-gate 		if ( !nsldapi_initialized ) {
66*7c478bd9Sstevel@tonic-gate 			nsldapi_initialize_defaults();
67*7c478bd9Sstevel@tonic-gate 		}
68*7c478bd9Sstevel@tonic-gate 		ld = &nsldapi_ld_defaults;
69*7c478bd9Sstevel@tonic-gate 	}
70*7c478bd9Sstevel@tonic-gate 
71*7c478bd9Sstevel@tonic-gate 	optionsp = ( entry == NULLMSG ) ? &ld->ld_lberoptions :
72*7c478bd9Sstevel@tonic-gate 	    &entry->lm_ber->ber_options;
73*7c478bd9Sstevel@tonic-gate 
74*7c478bd9Sstevel@tonic-gate 	if ( enable ) {
75*7c478bd9Sstevel@tonic-gate 		*optionsp |= LBER_OPT_TRANSLATE_STRINGS;
76*7c478bd9Sstevel@tonic-gate 	} else {
77*7c478bd9Sstevel@tonic-gate 		*optionsp &= ~LBER_OPT_TRANSLATE_STRINGS;
78*7c478bd9Sstevel@tonic-gate 	}
79*7c478bd9Sstevel@tonic-gate }
80*7c478bd9Sstevel@tonic-gate 
81*7c478bd9Sstevel@tonic-gate 
82*7c478bd9Sstevel@tonic-gate int
ldap_translate_from_t61(LDAP * ld,char ** bufp,unsigned long * lenp,int free_input)83*7c478bd9Sstevel@tonic-gate ldap_translate_from_t61( LDAP *ld, char **bufp, unsigned long *lenp,
84*7c478bd9Sstevel@tonic-gate     int free_input )
85*7c478bd9Sstevel@tonic-gate {
86*7c478bd9Sstevel@tonic-gate 	ber_len_t length = (ber_len_t)*lenp;
87*7c478bd9Sstevel@tonic-gate 
88*7c478bd9Sstevel@tonic-gate 	if ( ld->ld_lber_decode_translate_proc == NULL ) {
89*7c478bd9Sstevel@tonic-gate 		return( LDAP_SUCCESS );
90*7c478bd9Sstevel@tonic-gate 	}
91*7c478bd9Sstevel@tonic-gate 
92*7c478bd9Sstevel@tonic-gate 	return( (*ld->ld_lber_decode_translate_proc)( bufp, &length, free_input ));
93*7c478bd9Sstevel@tonic-gate }
94*7c478bd9Sstevel@tonic-gate 
95*7c478bd9Sstevel@tonic-gate 
96*7c478bd9Sstevel@tonic-gate int
ldap_translate_to_t61(LDAP * ld,char ** bufp,unsigned long * lenp,int free_input)97*7c478bd9Sstevel@tonic-gate ldap_translate_to_t61( LDAP *ld, char **bufp, unsigned long *lenp,
98*7c478bd9Sstevel@tonic-gate     int free_input )
99*7c478bd9Sstevel@tonic-gate {
100*7c478bd9Sstevel@tonic-gate 	ber_len_t length = (ber_len_t)*lenp;
101*7c478bd9Sstevel@tonic-gate 
102*7c478bd9Sstevel@tonic-gate 	if ( ld->ld_lber_encode_translate_proc == NULL ) {
103*7c478bd9Sstevel@tonic-gate 		return( LDAP_SUCCESS );
104*7c478bd9Sstevel@tonic-gate 	}
105*7c478bd9Sstevel@tonic-gate 
106*7c478bd9Sstevel@tonic-gate 	return( (*ld->ld_lber_encode_translate_proc)( bufp, &length, free_input ));
107*7c478bd9Sstevel@tonic-gate }
108*7c478bd9Sstevel@tonic-gate 
109*7c478bd9Sstevel@tonic-gate 
110*7c478bd9Sstevel@tonic-gate /*
111*7c478bd9Sstevel@tonic-gate  ** Character translation routine notes:
112*7c478bd9Sstevel@tonic-gate  *
113*7c478bd9Sstevel@tonic-gate  * On entry:  bufp points to a "string" to be converted (not necessarily
114*7c478bd9Sstevel@tonic-gate  *  zero-terminated) and buflenp points to the length of the buffer.
115*7c478bd9Sstevel@tonic-gate  *
116*7c478bd9Sstevel@tonic-gate  * On exit:  bufp should point to a malloc'd result.  If free_input is
117*7c478bd9Sstevel@tonic-gate  *  non-zero then the original bufp will be freed.  *buflenp should be
118*7c478bd9Sstevel@tonic-gate  *  set to the new length.  Zero bytes in the input buffer must be left
119*7c478bd9Sstevel@tonic-gate  *  as zero bytes.
120*7c478bd9Sstevel@tonic-gate  *
121*7c478bd9Sstevel@tonic-gate  * Return values: any ldap error code (LDAP_SUCCESS if all goes well).
122*7c478bd9Sstevel@tonic-gate  */
123*7c478bd9Sstevel@tonic-gate 
124*7c478bd9Sstevel@tonic-gate 
125*7c478bd9Sstevel@tonic-gate #ifdef LDAP_CHARSET_8859
126*7c478bd9Sstevel@tonic-gate 
127*7c478bd9Sstevel@tonic-gate #if LDAP_CHARSET_8859 == 88591
128*7c478bd9Sstevel@tonic-gate #define ISO_8859 1
129*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88592
130*7c478bd9Sstevel@tonic-gate #define ISO_8859 2
131*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88593
132*7c478bd9Sstevel@tonic-gate #define ISO_8859 3
133*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88594
134*7c478bd9Sstevel@tonic-gate #define ISO_8859 4
135*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88595
136*7c478bd9Sstevel@tonic-gate #define ISO_8859 5
137*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88596
138*7c478bd9Sstevel@tonic-gate #define ISO_8859 6
139*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88597
140*7c478bd9Sstevel@tonic-gate #define ISO_8859 7
141*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88598
142*7c478bd9Sstevel@tonic-gate #define ISO_8859 8
143*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 88599
144*7c478bd9Sstevel@tonic-gate #define ISO_8859 9
145*7c478bd9Sstevel@tonic-gate #elif LDAP_CHARSET_8859 == 885910
146*7c478bd9Sstevel@tonic-gate #define ISO_8859 10
147*7c478bd9Sstevel@tonic-gate #else
148*7c478bd9Sstevel@tonic-gate #define ISO_8859 0
149*7c478bd9Sstevel@tonic-gate #endif
150*7c478bd9Sstevel@tonic-gate 
151*7c478bd9Sstevel@tonic-gate /*
152*7c478bd9Sstevel@tonic-gate  * the following ISO_8859 to/afrom T.61 character set translation code is
153*7c478bd9Sstevel@tonic-gate  * based on the code found in Enrique Silvestre Mora's iso-t61.c, found
154*7c478bd9Sstevel@tonic-gate  * as part of this package:
155*7c478bd9Sstevel@tonic-gate  *   ftp://pereiii.uji.es/pub/uji-ftp/unix/ldap/iso-t61.translation.tar.Z
156*7c478bd9Sstevel@tonic-gate  * Enrique is now (10/95) at this address: enrique.silvestre@uv.es
157*7c478bd9Sstevel@tonic-gate  *
158*7c478bd9Sstevel@tonic-gate  * changes made by mcs@umich.edu 12 October 1995:
159*7c478bd9Sstevel@tonic-gate  *   Change calling conventions of iso8859_t61() and t61_iso8859() to
160*7c478bd9Sstevel@tonic-gate  *	match libldap conventions; rename to ldap_8859_to_t61() and
161*7c478bd9Sstevel@tonic-gate  *	ldap_t61_to_8859().
162*7c478bd9Sstevel@tonic-gate  *   Change conversion routines to deal with non-zero terminated strings.
163*7c478bd9Sstevel@tonic-gate  *   ANSI-ize functions and include prototypes.
164*7c478bd9Sstevel@tonic-gate  */
165*7c478bd9Sstevel@tonic-gate 
166*7c478bd9Sstevel@tonic-gate /* iso-t61.c - ISO-T61 translation routines (version: 0.2.1, July-1994) */
167*7c478bd9Sstevel@tonic-gate /*
168*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1994 Enrique Silvestre Mora, Universitat Jaume I, Spain.
169*7c478bd9Sstevel@tonic-gate  * All rights reserved.
170*7c478bd9Sstevel@tonic-gate  *
171*7c478bd9Sstevel@tonic-gate  * Redistribution and use in source and binary forms are permitted
172*7c478bd9Sstevel@tonic-gate  * provided that this notice is preserved and that due credit is given
173*7c478bd9Sstevel@tonic-gate  * to the Universitat Jaume I. The name of the University
174*7c478bd9Sstevel@tonic-gate  * may not be used to endorse or promote products derived from this
175*7c478bd9Sstevel@tonic-gate  * software without specific prior written permission. This software
176*7c478bd9Sstevel@tonic-gate  * is provided ``as is'' without express or implied warranty.
177*7c478bd9Sstevel@tonic-gate */
178*7c478bd9Sstevel@tonic-gate 
179*7c478bd9Sstevel@tonic-gate 
180*7c478bd9Sstevel@tonic-gate #include <stdio.h>
181*7c478bd9Sstevel@tonic-gate #include <stdlib.h>
182*7c478bd9Sstevel@tonic-gate #include <string.h>
183*7c478bd9Sstevel@tonic-gate 
184*7c478bd9Sstevel@tonic-gate /* Character set used: ISO 8859-1, ISO 8859-2, ISO 8859-3, ... */
185*7c478bd9Sstevel@tonic-gate /* #define  ISO_8859      1 */
186*7c478bd9Sstevel@tonic-gate 
187*7c478bd9Sstevel@tonic-gate #ifndef ISO_8859
188*7c478bd9Sstevel@tonic-gate #  define ISO_8859     0
189*7c478bd9Sstevel@tonic-gate #endif
190*7c478bd9Sstevel@tonic-gate 
191*7c478bd9Sstevel@tonic-gate typedef unsigned char  Byte;
192*7c478bd9Sstevel@tonic-gate typedef struct { Byte  a, b; } Couple;
193*7c478bd9Sstevel@tonic-gate 
194*7c478bd9Sstevel@tonic-gate #ifdef NEEDPROTOS
195*7c478bd9Sstevel@tonic-gate static Byte *c_to_hh( Byte *o, Byte c );
196*7c478bd9Sstevel@tonic-gate static Byte *c_to_cc( Byte *o, Couple *cc, Byte c );
197*7c478bd9Sstevel@tonic-gate static int hh_to_c( Byte *h );
198*7c478bd9Sstevel@tonic-gate static Byte *cc_to_t61( Byte *o, Byte *s );
199*7c478bd9Sstevel@tonic-gate #else /* NEEDPROTOS */
200*7c478bd9Sstevel@tonic-gate static Byte *c_to_hh();
201*7c478bd9Sstevel@tonic-gate static Byte *c_to_cc();
202*7c478bd9Sstevel@tonic-gate static int hh_to_c();
203*7c478bd9Sstevel@tonic-gate static Byte *cc_to_t61();
204*7c478bd9Sstevel@tonic-gate #endif /* NEEDPROTOS */
205*7c478bd9Sstevel@tonic-gate 
206*7c478bd9Sstevel@tonic-gate /*
207*7c478bd9Sstevel@tonic-gate    Character choosed as base in diacritics alone: NO-BREAK SPACE.
208*7c478bd9Sstevel@tonic-gate    (The standard say it must be a blank space, 0x20.)
209*7c478bd9Sstevel@tonic-gate */
210*7c478bd9Sstevel@tonic-gate #define  ALONE  0xA0
211*7c478bd9Sstevel@tonic-gate 
212*7c478bd9Sstevel@tonic-gate static Couple diacritic[16] = {
213*7c478bd9Sstevel@tonic-gate #if (ISO_8859 == 1) || (ISO_8859 == 9)
214*7c478bd9Sstevel@tonic-gate 	{0,0},       {'`',0},     {0xb4,0},    {'^',0},
215*7c478bd9Sstevel@tonic-gate 	{'~',0},     {0xaf,0},    {'(',ALONE}, {'.',ALONE},
216*7c478bd9Sstevel@tonic-gate 	{0xa8,0},    {0,0},       {'0',ALONE}, {0xb8,0},
217*7c478bd9Sstevel@tonic-gate 	{0,0},       {'"',ALONE}, {';',ALONE}, {'<',ALONE},
218*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 2)
219*7c478bd9Sstevel@tonic-gate 	{0,0},       {'`',0},     {0xb4,0},    {'^',0},
220*7c478bd9Sstevel@tonic-gate 	{'~',0},     {'-',ALONE}, {0xa2,0},    {0xff,0},
221*7c478bd9Sstevel@tonic-gate 	{0xa8,0},    {0,0},       {'0',ALONE}, {0xb8,0},
222*7c478bd9Sstevel@tonic-gate 	{0,0},       {0xbd,0},    {0xb2,0},    {0xb7,0}
223*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 3)
224*7c478bd9Sstevel@tonic-gate 	{0,0},       {'`',0},     {0xb4,0},    {'^',0},
225*7c478bd9Sstevel@tonic-gate 	{'~',0},     {'-',ALONE}, {0xa2,0},    {0xff,0},
226*7c478bd9Sstevel@tonic-gate 	{0xa8,0},    {0,0},       {'0',ALONE}, {0xb8,0},
227*7c478bd9Sstevel@tonic-gate 	{0,0},       {'"',ALONE}, {';',ALONE}, {'<',ALONE}
228*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 4)
229*7c478bd9Sstevel@tonic-gate 	{0,0},       {'`',0},     {0xb4,0},    {'^',0},
230*7c478bd9Sstevel@tonic-gate 	{'~',0},     {0xaf,0},    {'(',ALONE}, {0xff,0},
231*7c478bd9Sstevel@tonic-gate 	{0xa8,0},    {0,0},       {'0',ALONE}, {0xb8,0},
232*7c478bd9Sstevel@tonic-gate 	{0,0},       {'"',ALONE}, {0xb2,0},    {0xb7,0}
233*7c478bd9Sstevel@tonic-gate #else
234*7c478bd9Sstevel@tonic-gate 	{0,0},       {'`',0},     {'\'',ALONE}, {'^',0},
235*7c478bd9Sstevel@tonic-gate 	{'~',0},     {'-',ALONE}, {'(',ALONE},  {'.',ALONE},
236*7c478bd9Sstevel@tonic-gate 	{':',ALONE}, {0,0},       {'0',ALONE},  {',',ALONE},
237*7c478bd9Sstevel@tonic-gate 	{0,0},       {'"',ALONE}, {';',ALONE},  {'<',ALONE}
238*7c478bd9Sstevel@tonic-gate #endif
239*7c478bd9Sstevel@tonic-gate };
240*7c478bd9Sstevel@tonic-gate 
241*7c478bd9Sstevel@tonic-gate /*
242*7c478bd9Sstevel@tonic-gate    --- T.61 (T.51) letters with diacritics: conversion to ISO 8859-n -----
243*7c478bd9Sstevel@tonic-gate        A,   C,   D,   E,   G,   H,   I,   J,   K,
244*7c478bd9Sstevel@tonic-gate        L,   N,   O,   R,   S,   T,   U,   W,   Y,   Z.
245*7c478bd9Sstevel@tonic-gate    -----------------------------------------------------------------------
246*7c478bd9Sstevel@tonic-gate */
247*7c478bd9Sstevel@tonic-gate static int letter_w_diacritic[16][38] = {
248*7c478bd9Sstevel@tonic-gate #if (ISO_8859 == 1)
249*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
250*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
251*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
252*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
253*7c478bd9Sstevel@tonic-gate 	0xc0,0,   0,   0xc8,0,   0,   0xcc,0,   0,
254*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd2,0,   0,   0,   0xd9,0,   0,   0,
255*7c478bd9Sstevel@tonic-gate 	0xe0,0,   0,   0xe8,0,   0,   0xec,0,   0,
256*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf2,0,   0,   0,   0xf9,0,   0,   0,
257*7c478bd9Sstevel@tonic-gate 	0xc1,-1,  0,   0xc9,0,   0,   0xcd,0,   0,
258*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xd3,-1,  -1,  0,   0xda,0,   0xdd,-1,
259*7c478bd9Sstevel@tonic-gate 	0xe1,-1,  0,   0xe9,0,   0,   0xed,0,   0,
260*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xf3,-1,  -1,  0,   0xfa,0,   0xfd,-1,
261*7c478bd9Sstevel@tonic-gate 	0xc2,-1,  0,   0xca,-1,  -1,  0xce,-1,  0,
262*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd4,0,   -1,  0,   0xdb,-1,  -1,  0,
263*7c478bd9Sstevel@tonic-gate 	0xe2,-1,  0,   0xea,-1,  -1,  0xee,-1,  0,
264*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf4,0,   -1,  0,   0xfb,-1,  -1,  0,
265*7c478bd9Sstevel@tonic-gate 	0xc3,0,   0,   0,   0,   0,   -1,  0,   0,
266*7c478bd9Sstevel@tonic-gate 	0,   0xd1,0xd5,0,   0,   0,   -1,  0,   0,   0,
267*7c478bd9Sstevel@tonic-gate 	0xe3,0,   0,   0,   0,   0,   -1,  0,   0,
268*7c478bd9Sstevel@tonic-gate 	0,   0xf1,0xf5,0,   0,   0,   -1,  0,   0,   0,
269*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
270*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
271*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
272*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
273*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
274*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
275*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
276*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
277*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   -1,  -1,  0,   -1,  0,   0,
278*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
279*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   -1,  -1,  0,   0,   0,   0,
280*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
281*7c478bd9Sstevel@tonic-gate 	0xc4,0,   0,   0xcb,0,   0,   0xcf,0,   0,
282*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd6,0,   0,   0,   0xdc,0,   -1,  0,
283*7c478bd9Sstevel@tonic-gate 	0xe4,0,   0,   0xeb,0,   0,   0xef,0,   0,
284*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf6,0,   0,   0,   0xfc,0,   0xff,0,
285*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
286*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
287*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
288*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
289*7c478bd9Sstevel@tonic-gate 	0xc5,0,   0,   0,   0,   0,   0,   0,   0,
290*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
291*7c478bd9Sstevel@tonic-gate 	0xe5,0,   0,   0,   0,   0,   0,   0,   0,
292*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
293*7c478bd9Sstevel@tonic-gate 	0,   0xc7,0,   0,   -1,  0,   0,   0,   -1,
294*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   0,
295*7c478bd9Sstevel@tonic-gate 	0,   0xe7,0,   0,   -1,  0,   0,   0,   -1,
296*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   0,
297*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
298*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
299*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
300*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
301*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
302*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
303*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
304*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
305*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
306*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
307*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
308*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
309*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
310*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1,
311*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
312*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1
313*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 2)
314*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
315*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
316*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
317*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
318*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
319*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
320*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
321*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
322*7c478bd9Sstevel@tonic-gate 	0xc1,0xc6,0,   0xc9,0,   0,   0xcd,0,   0,
323*7c478bd9Sstevel@tonic-gate 	0xc5,0xd1,0xd3,0xc0,0xa6,0,   0xda,0,   0xdd,0xac,
324*7c478bd9Sstevel@tonic-gate 	0xe1,0xe6,0,   0xe9,0,   0,   0xed,0,   0,
325*7c478bd9Sstevel@tonic-gate 	0xe5,0xf1,0xf3,0xe0,0xb6,0,   0xfa,0,   0xfd,0xbc,
326*7c478bd9Sstevel@tonic-gate 	0xc2,-1,  0,   -1,  -1,  -1,  0xce,-1,  0,
327*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd4,0,   -1,  0,   -1,  -1,  -1,  0,
328*7c478bd9Sstevel@tonic-gate 	0xe2,-1,  0,   -1,  -1,  -1,  0xee,-1,  0,
329*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf4,0,   -1,  0,   -1,  -1,  -1,  0,
330*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   -1,  0,   0,
331*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  0,   0,   0,   -1,  0,   0,   0,
332*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   -1,  0,   0,
333*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  0,   0,   0,   -1,  0,   0,   0,
334*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
335*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
336*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
337*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
338*7c478bd9Sstevel@tonic-gate 	0xc3,0,   0,   0,   -1,  0,   0,   0,   0,
339*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
340*7c478bd9Sstevel@tonic-gate 	0xe3,0,   0,   0,   -1,  0,   0,   0,   0,
341*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
342*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   -1,  -1,  0,   -1,  0,   0,
343*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0xaf,
344*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   -1,  -1,  0,   0,   0,   0,
345*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0xbf,
346*7c478bd9Sstevel@tonic-gate 	0xc4,0,   0,   0xcb,0,   0,   -1,  0,   0,
347*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd6,0,   0,   0,   0xdc,0,   -1,  0,
348*7c478bd9Sstevel@tonic-gate 	0xe4,0,   0,   0xeb,0,   0,   -1,  0,   0,
349*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf6,0,   0,   0,   0xfc,0,   -1,  0,
350*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
351*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
352*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
353*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
354*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   0,   0,   0,
355*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xd9,0,   0,   0,
356*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   0,   0,   0,
357*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xf9,0,   0,   0,
358*7c478bd9Sstevel@tonic-gate 	0,   0xc7,0,   0,   -1,  0,   0,   0,   -1,
359*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xaa,0xde,0,   0,   0,   0,
360*7c478bd9Sstevel@tonic-gate 	0,   0xe7,0,   0,   -1,  0,   0,   0,   -1,
361*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xba,0xfe,0,   0,   0,   0,
362*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
363*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
364*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
365*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
366*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
367*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd5,0,   0,   0,   0xdb,0,   0,   0,
368*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
369*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf5,0,   0,   0,   0xfb,0,   0,   0,
370*7c478bd9Sstevel@tonic-gate 	0xa1,0,   0,   0xca,0,   0,   -1,  0,   0,
371*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
372*7c478bd9Sstevel@tonic-gate 	0xb1,0,   0,   0xea,0,   0,   -1,  0,   0,
373*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
374*7c478bd9Sstevel@tonic-gate 	0,   0xc8,0xcf,0xcc,0,   0,   0,   0,   0,
375*7c478bd9Sstevel@tonic-gate 	0xa5,0xd2,0,   0xd8,0xa9,0xab,0,   0,   0,   0xae,
376*7c478bd9Sstevel@tonic-gate 	0,   0xe8,0xef,0xec,0,   0,   0,   0,   0,
377*7c478bd9Sstevel@tonic-gate 	0xb5,0xf2,0,   0xf8,0xb9,0xbb,0,   0,   0,   0xbe
378*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 3)
379*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
380*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
381*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
382*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
383*7c478bd9Sstevel@tonic-gate 	0xc0,0,   0,   0xc8,0,   0,   0xcc,0,   0,
384*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd2,0,   0,   0,   0xd9,0,   0,   0,
385*7c478bd9Sstevel@tonic-gate 	0xe0,0,   0,   0xe8,0,   0,   0xec,0,   0,
386*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf2,0,   0,   0,   0xf9,0,   0,   0,
387*7c478bd9Sstevel@tonic-gate 	0xc1,-1,  0,   0xc9,0,   0,   0xcd,0,   0,
388*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xd3,-1,  -1,  0,   0xda,0,   -1,  -1,
389*7c478bd9Sstevel@tonic-gate 	0xe1,-1,  0,   0xe9,0,   0,   0xed,0,   0,
390*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xf3,-1,  -1,  0,   0xfa,0,   -1,  -1,
391*7c478bd9Sstevel@tonic-gate 	0xc2,0xc6,0,   0xca,0xd8,0xa6,0xce,0xac,0,
392*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd4,0,   0xde,0,   0xdb,-1,  -1,  0,
393*7c478bd9Sstevel@tonic-gate 	0xe2,0xe6,0,   0xea,0xf8,0xb6,0xee,0xbc,0,
394*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf4,0,   0xfe,0,   0xfb,-1,  -1,  0,
395*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   -1,  0,   0,
396*7c478bd9Sstevel@tonic-gate 	0,   0xd1,-1,  0,   0,   0,   -1,  0,   0,   0,
397*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   -1,  0,   0,
398*7c478bd9Sstevel@tonic-gate 	0,   0xf1,-1,  0,   0,   0,   -1,  0,   0,   0,
399*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
400*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
401*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
402*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
403*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0xab,0,   0,   0,   0,
404*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xdd,0,   0,   0,
405*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0xbb,0,   0,   0,   0,
406*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xfd,0,   0,   0,
407*7c478bd9Sstevel@tonic-gate 	0,   0xc5,0,   -1,  0xd5,0,   0xa9,0,   0,
408*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0xaf,
409*7c478bd9Sstevel@tonic-gate 	0,   0xe5,0,   -1,  0xf5,0,   0,   0,   0,
410*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0xbf,
411*7c478bd9Sstevel@tonic-gate 	0xc4,0,   0,   0xcb,0,   0,   0xcf,0,   0,
412*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd6,0,   0,   0,   0xdc,0,   -1,  0,
413*7c478bd9Sstevel@tonic-gate 	0xe4,0,   0,   0xeb,0,   0,   0xef,0,   0,
414*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf6,0,   0,   0,   0xfc,0,   -1,  0,
415*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
416*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
417*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
418*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
419*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   0,   0,   0,
420*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
421*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   0,   0,   0,
422*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
423*7c478bd9Sstevel@tonic-gate 	0,   0xc7,0,   0,   -1,  0,   0,   0,   -1,
424*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xaa,-1,  0,   0,   0,   0,
425*7c478bd9Sstevel@tonic-gate 	0,   0xe7,0,   0,   -1,  0,   0,   0,   -1,
426*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xba,-1,  0,   0,   0,   0,
427*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
428*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
429*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
430*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
431*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
432*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
433*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
434*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
435*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
436*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
437*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
438*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
439*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
440*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1,
441*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
442*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1
443*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 4)
444*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
445*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
446*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
447*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
448*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
449*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
450*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
451*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
452*7c478bd9Sstevel@tonic-gate 	0xc1,-1,  0,   0xc9,0,   0,   0xcd,0,   0,
453*7c478bd9Sstevel@tonic-gate 	-1,  -1,  -1,  -1,  -1,  0,   0xda,0,   -1,  -1,
454*7c478bd9Sstevel@tonic-gate 	0xe1,-1,  0,   0xe9,0,   0,   0xed,0,   0,
455*7c478bd9Sstevel@tonic-gate 	-1,  -1,  -1,  -1,  -1,  0,   0xfa,0,   -1,  -1,
456*7c478bd9Sstevel@tonic-gate 	0xc2,-1,  0,   -1,  -1,  -1,  0xce,-1,  0,
457*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd4,0,   -1,  0,   0xdb,-1,  -1,  0,
458*7c478bd9Sstevel@tonic-gate 	0xe2,-1,  0,   -1,  -1,  -1,  0xee,-1,  0,
459*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf4,0,   -1,  0,   0xfb,-1,  -1,  0,
460*7c478bd9Sstevel@tonic-gate 	0xc3,0,   0,   0,   0,   0,   0xa5,0,   0,
461*7c478bd9Sstevel@tonic-gate 	0,   -1,  0xd5,0,   0,   0,   0xdd,0,   0,   0,
462*7c478bd9Sstevel@tonic-gate 	0xe3,0,   0,   0,   0,   0,   0xb5,0,   0,
463*7c478bd9Sstevel@tonic-gate 	0,   -1,  0xf5,0,   0,   0,   0xfd,0,   0,   0,
464*7c478bd9Sstevel@tonic-gate 	0xc0,0,   0,   0xaa,0,   0,   0xcf,0,   0,
465*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd2,0,   0,   0,   0xde,0,   0,   0,
466*7c478bd9Sstevel@tonic-gate 	0xe0,0,   0,   0xba,0,   0,   0xef,0,   0,
467*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf2,0,   0,   0,   0xfe,0,   0,   0,
468*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
469*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
470*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
471*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
472*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0xcc,-1,  0,   -1,  0,   0,
473*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
474*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0xec,-1,  0,   0,   0,   0,
475*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
476*7c478bd9Sstevel@tonic-gate 	0xc4,0,   0,   0xcb,0,   0,   -1,  0,   0,
477*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd6,0,   0,   0,   0xdc,0,   -1,  0,
478*7c478bd9Sstevel@tonic-gate 	0xe4,0,   0,   0xeb,0,   0,   -1,  0,   0,
479*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf6,0,   0,   0,   0xfc,0,   -1,  0,
480*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
481*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
482*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
483*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
484*7c478bd9Sstevel@tonic-gate 	0xc5,0,   0,   0,   0,   0,   0,   0,   0,
485*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
486*7c478bd9Sstevel@tonic-gate 	0xe5,0,   0,   0,   0,   0,   0,   0,   0,
487*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
488*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0,   0xab,0,   0,   0,   0xd3,
489*7c478bd9Sstevel@tonic-gate 	0xa6,0xd1,0,   0xa3,-1,  -1,  0,   0,   0,   0,
490*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0,   0xbb,0,   0,   0,   0xf3,
491*7c478bd9Sstevel@tonic-gate 	0xb6,0xf1,0,   0xb3,-1,  -1,  0,   0,   0,   0,
492*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
493*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
494*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
495*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
496*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
497*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
498*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
499*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
500*7c478bd9Sstevel@tonic-gate 	0xa1,0,   0,   0xca,0,   0,   0xc7,0,   0,
501*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xd9,0,   0,   0,
502*7c478bd9Sstevel@tonic-gate 	0xb1,0,   0,   0xea,0,   0,   0xe7,0,   0,
503*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xf9,0,   0,   0,
504*7c478bd9Sstevel@tonic-gate 	0,   0xc8,-1,  -1,  0,   0,   0,   0,   0,
505*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xa9,-1,  0,   0,   0,   0xae,
506*7c478bd9Sstevel@tonic-gate 	0,   0xe8,-1,  -1,  0,   0,   0,   0,   0,
507*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xb9,-1,  0,   0,   0,   0xbe
508*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 9)
509*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
510*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
511*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
512*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
513*7c478bd9Sstevel@tonic-gate 	0xc0,0,   0,   0xc8,0,   0,   0xcc,0,   0,
514*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd2,0,   0,   0,   0xd9,0,   0,   0,
515*7c478bd9Sstevel@tonic-gate 	0xe0,0,   0,   0xe8,0,   0,   -1,  0,   0,
516*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf2,0,   0,   0,   0xf9,0,   0,   0,
517*7c478bd9Sstevel@tonic-gate 	0xc1,-1,  0,   0xc9,0,   0,   0xcd,0,   0,
518*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xd3,-1,  -1,  0,   0xda,0,   -1,  -1,
519*7c478bd9Sstevel@tonic-gate 	0xe1,-1,  0,   0xe9,0,   0,   0xed,0,   0,
520*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xf3,-1,  -1,  0,   0xfa,0,   -1,  -1,
521*7c478bd9Sstevel@tonic-gate 	0xc2,-1,  0,   0xca,-1,  -1,  0xce,-1,  0,
522*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd4,0,   -1,  0,   0xdb,-1,  -1,  0,
523*7c478bd9Sstevel@tonic-gate 	0xe2,-1,  0,   -1,  -1,  -1,  0xee,-1,  0,
524*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf4,0,   -1,  0,   0xfb,-1,  -1,  0,
525*7c478bd9Sstevel@tonic-gate 	0xc3,0,   0,   0,   0,   0,   -1,  0,   0,
526*7c478bd9Sstevel@tonic-gate 	0,   0xd1,0xd5,0,   0,   0,   -1,  0,   0,   0,
527*7c478bd9Sstevel@tonic-gate 	0xe3,0,   0,   0,   0,   0,   -1,  0,   0,
528*7c478bd9Sstevel@tonic-gate 	0,   0xf1,0xf5,0,   0,   0,   -1,  0,   0,   0,
529*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
530*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
531*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   0xef,0,   0,
532*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
533*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0xd0,0,   0,   0,   0,
534*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
535*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0xf0,0,   0,   0,   0,
536*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
537*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   -1,  -1,  0,   0xdd,0,   0,
538*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
539*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0xec,-1,  0,   0,   0,   0,
540*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
541*7c478bd9Sstevel@tonic-gate 	0xc4,0,   0,   0xcb,0,   0,   0xcf,0,   0,
542*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd6,0,   0,   0,   0xdc,0,   -1,  0,
543*7c478bd9Sstevel@tonic-gate 	0xe4,0,   0,   0xeb,0,   0,   -1,  0,   0,
544*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf6,0,   0,   0,   0xfc,0,   0xff,0,
545*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
546*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
547*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
548*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
549*7c478bd9Sstevel@tonic-gate 	0xc5,0,   0,   0,   0,   0,   0,   0,   0,
550*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
551*7c478bd9Sstevel@tonic-gate 	0xe5,0,   0,   0,   0,   0,   0,   0,   0,
552*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
553*7c478bd9Sstevel@tonic-gate 	0,   0xc7,0,   0,   -1,  0,   0,   0,   -1,
554*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xde,-1,  0,   0,   0,   0,
555*7c478bd9Sstevel@tonic-gate 	0,   0xe7,0,   0,   -1,  0,   0,   0,   -1,
556*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xfe,-1,  0,   0,   0,   0,
557*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
558*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
559*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
560*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
561*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
562*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
563*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
564*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
565*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
566*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
567*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0xea,0,   0,   -1,  0,   0,
568*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
569*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
570*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1,
571*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
572*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1
573*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 10)
574*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
575*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
576*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
577*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
578*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
579*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
580*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
581*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
582*7c478bd9Sstevel@tonic-gate 	0xc1,-1,  0,   0xc9,0,   0,   0xcd,0,   0,
583*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xd3,-1,  -1,  0,   0xda,0,   0xdd,-1,
584*7c478bd9Sstevel@tonic-gate 	0xe1,-1,  0,   0xe9,0,   0,   0xed,0,   0,
585*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0xf3,-1,  -1,  0,   0xfa,0,   0xfd,-1,
586*7c478bd9Sstevel@tonic-gate 	0xc2,-1,  0,   -1,  -1,  -1,  0xce,-1,  0,
587*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd4,0,   -1,  0,   0xdb,-1,  -1,  0,
588*7c478bd9Sstevel@tonic-gate 	0xe2,-1,  0,   -1,  -1,  -1,  0xee,-1,  0,
589*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf4,0,   -1,  0,   0xfb,-1,  -1,  0,
590*7c478bd9Sstevel@tonic-gate 	0xc3,0,   0,   0,   0,   0,   0xa5,0,   0,
591*7c478bd9Sstevel@tonic-gate 	0,   -1,  0xd5,0,   0,   0,   0xd7,0,   0,   0,
592*7c478bd9Sstevel@tonic-gate 	0xe3,0,   0,   0,   0,   0,   0xb5,0,   0,
593*7c478bd9Sstevel@tonic-gate 	0,   -1,  0xf5,0,   0,   0,   0xf7,0,   0,   0,
594*7c478bd9Sstevel@tonic-gate 	0xc0,0,   0,   0xa2,0,   0,   0xa4,0,   0,
595*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd2,0,   0,   0,   0xae,0,   0,   0,
596*7c478bd9Sstevel@tonic-gate 	0xe0,0,   0,   0xb2,0,   0,   0xb4,0,   0,
597*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf2,0,   0,   0,   0xbe,0,   0,   0,
598*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
599*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
600*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
601*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
602*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0xcc,-1,  0,   -1,  0,   0,
603*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
604*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0xec,-1,  0,   0,   0,   0,
605*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
606*7c478bd9Sstevel@tonic-gate 	0xc4,0,   0,   0xcb,0,   0,   0xcf,0,   0,
607*7c478bd9Sstevel@tonic-gate 	0,   0,   0xd6,0,   0,   0,   0xdc,0,   -1,  0,
608*7c478bd9Sstevel@tonic-gate 	0xe4,0,   0,   0xeb,0,   0,   0xef,0,   0,
609*7c478bd9Sstevel@tonic-gate 	0,   0,   0xf6,0,   0,   0,   0xfc,0,   -1,  0,
610*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
611*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
612*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
613*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
614*7c478bd9Sstevel@tonic-gate 	0xc5,0,   0,   0,   0,   0,   0,   0,   0,
615*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
616*7c478bd9Sstevel@tonic-gate 	0xe5,0,   0,   0,   0,   0,   0,   0,   0,
617*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
618*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0,   0xa3,0,   0,   0,   0xa6,
619*7c478bd9Sstevel@tonic-gate 	0xa8,0xd1,0,   -1,  -1,  -1,  0,   0,   0,   0,
620*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0,   0xb3,0,   0,   0,   0xb6,
621*7c478bd9Sstevel@tonic-gate 	0xb8,0xf1,0,   -1,  -1,  -1,  0,   0,   0,   0,
622*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
623*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
624*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
625*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
626*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
627*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
628*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
629*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
630*7c478bd9Sstevel@tonic-gate 	0xa1,0,   0,   0xca,0,   0,   0xc7,0,   0,
631*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xd9,0,   0,   0,
632*7c478bd9Sstevel@tonic-gate 	0xb1,0,   0,   0xea,0,   0,   0xe7,0,   0,
633*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0xf9,0,   0,   0,
634*7c478bd9Sstevel@tonic-gate 	0,   0xc8,-1,  -1,  0,   0,   0,   0,   0,
635*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xaa,-1,  0,   0,   0,   0xac,
636*7c478bd9Sstevel@tonic-gate 	0,   0xe8,-1,  -1,  0,   0,   0,   0,   0,
637*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0xba,-1,  0,   0,   0,   0xbc
638*7c478bd9Sstevel@tonic-gate #else
639*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
640*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
641*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
642*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
643*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
644*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
645*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
646*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
647*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0,   0,   -1,  0,   0,
648*7c478bd9Sstevel@tonic-gate 	-1,  -1,  -1,  -1,  -1,  0,   -1,  0,   -1,  -1,
649*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  0,   0,   -1,  0,   0,
650*7c478bd9Sstevel@tonic-gate 	-1,  -1,  -1,  -1,  -1,  0,   -1,  0,   -1,  -1,
651*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  -1,  -1,  0,
652*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   -1,  0,   -1,  -1,  -1,  0,
653*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  -1,  -1,  0,
654*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   -1,  0,   -1,  -1,  -1,  0,
655*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   -1,  0,   0,
656*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  0,   0,   0,   -1,  0,   0,   0,
657*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   -1,  0,   0,
658*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  0,   0,   0,   -1,  0,   0,   0,
659*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
660*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
661*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
662*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
663*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
664*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
665*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   -1,  0,   0,   0,   0,
666*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
667*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   -1,  -1,  0,   -1,  0,   0,
668*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
669*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   -1,  -1,  0,   0,   0,   0,
670*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   -1,
671*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
672*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   -1,  0,
673*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
674*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   -1,  0,
675*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
676*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
677*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
678*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
679*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   0,   0,   0,
680*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
681*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   0,   0,   0,   0,   0,   0,
682*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
683*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0,   -1,  0,   0,   0,   -1,
684*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   0,
685*7c478bd9Sstevel@tonic-gate 	0,   -1,  0,   0,   -1,  0,   0,   0,   -1,
686*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   0,
687*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
688*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
689*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
690*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
691*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
692*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
693*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   0,   0,   0,
694*7c478bd9Sstevel@tonic-gate 	0,   0,   -1,  0,   0,   0,   -1,  0,   0,   0,
695*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
696*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
697*7c478bd9Sstevel@tonic-gate 	-1,  0,   0,   -1,  0,   0,   -1,  0,   0,
698*7c478bd9Sstevel@tonic-gate 	0,   0,   0,   0,   0,   0,   -1,  0,   0,   0,
699*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
700*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1,
701*7c478bd9Sstevel@tonic-gate 	0,   -1,  -1,  -1,  0,   0,   0,   0,   0,
702*7c478bd9Sstevel@tonic-gate 	-1,  -1,  0,   -1,  -1,  -1,  0,   0,   0,   -1
703*7c478bd9Sstevel@tonic-gate #endif
704*7c478bd9Sstevel@tonic-gate };
705*7c478bd9Sstevel@tonic-gate 
706*7c478bd9Sstevel@tonic-gate /*
707*7c478bd9Sstevel@tonic-gate --- T.61 characters [0xA0 .. 0xBF] -----------------
708*7c478bd9Sstevel@tonic-gate */
709*7c478bd9Sstevel@tonic-gate static Couple trans_t61a_iso8859[32] = {
710*7c478bd9Sstevel@tonic-gate #if (ISO_8859 == 1) || (ISO_8859 == 9)
711*7c478bd9Sstevel@tonic-gate 	{'N','S'}, {0xa1,0},  {0xa2,0},  {0xa3,0},
712*7c478bd9Sstevel@tonic-gate 	{'D','O'}, {0xa5,0},  {'C','u'}, {0xa7,0},
713*7c478bd9Sstevel@tonic-gate 	{0xa4,0},  {'\'','6'},{'"','6'}, {0xab,0},
714*7c478bd9Sstevel@tonic-gate 	{'<','-'}, {'-','!'}, {'-','>'}, {'-','v'},
715*7c478bd9Sstevel@tonic-gate 	{0xb0,0},  {0xb1,0},  {0xb2,0},  {0xb3,0},
716*7c478bd9Sstevel@tonic-gate 	{0xd7,0},  {0xb5,0},  {0xb6,0},  {0xb7,0},
717*7c478bd9Sstevel@tonic-gate 	{0xf7,0},  {'\'','9'},{'"','9'}, {0xbb,0},
718*7c478bd9Sstevel@tonic-gate 	{0xbc,0},  {0xbd,0},  {0xbe,0},  {0xbf,0}
719*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 2) || (ISO_8859 == 4)
720*7c478bd9Sstevel@tonic-gate 	{'N','S'}, {'!','I'}, {'C','t'}, {'P','d'},
721*7c478bd9Sstevel@tonic-gate 	{'D','O'}, {'Y','e'}, {'C','u'}, {0xa7,0},
722*7c478bd9Sstevel@tonic-gate 	{0xa4,0},  {'\'','6'},{'"','6'}, {'<','<'},
723*7c478bd9Sstevel@tonic-gate 	{'<','-'}, {'-','!'}, {'-','>'}, {'-','v'},
724*7c478bd9Sstevel@tonic-gate 	{0xb0,0},  {'+','-'}, {'2','S'}, {'3','S'},
725*7c478bd9Sstevel@tonic-gate 	{0xd7,0},  {'M','y'}, {'P','I'}, {'.','M'},
726*7c478bd9Sstevel@tonic-gate 	{0xf7,0},  {'\'','9'},{'"','9'}, {'>','>'},
727*7c478bd9Sstevel@tonic-gate 	{'1','4'}, {'1','2'}, {'3','4'}, {'?','I'},
728*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 3)
729*7c478bd9Sstevel@tonic-gate 	{'N','S'}, {'!','I'}, {'C','t'}, {0xa3,0},
730*7c478bd9Sstevel@tonic-gate 	{'D','O'}, {'Y','e'}, {'C','u'}, {0xa7,0},
731*7c478bd9Sstevel@tonic-gate 	{0xa4,0},  {'\'','6'},{'"','6'}, {'<','<'},
732*7c478bd9Sstevel@tonic-gate 	{'<','-'}, {'-','!'}, {'-','>'}, {'-','v'},
733*7c478bd9Sstevel@tonic-gate 	{0xb0,0},  {'+','-'}, {0xb2,0},  {0xb3,0},
734*7c478bd9Sstevel@tonic-gate 	{0xd7,0},  {0xb5,0},  {'P','I'}, {0xb7,0},
735*7c478bd9Sstevel@tonic-gate 	{0xf7,0},  {'\'','9'},{'"','9'}, {'>','>'},
736*7c478bd9Sstevel@tonic-gate 	{'1','4'}, {0xbd,0},  {'3','4'}, {'?','I'}
737*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 10)
738*7c478bd9Sstevel@tonic-gate 	{'N','S'}, {'!','I'}, {'C','t'}, {'P','d'},
739*7c478bd9Sstevel@tonic-gate 	{'D','O'}, {'Y','e'}, {'C','u'}, {0xa7,0},
740*7c478bd9Sstevel@tonic-gate 	{'C','u'}, {'\'','6'},{'"','6'}, {'<','<'},
741*7c478bd9Sstevel@tonic-gate 	{'<','-'}, {'-','!'}, {'-','>'}, {'-','v'},
742*7c478bd9Sstevel@tonic-gate 	{0xb0,0},  {'+','-'}, {'2','S'}, {'3','S'},
743*7c478bd9Sstevel@tonic-gate 	{'*','X'}, {'M','y'}, {'P','I'}, {0xb7,0},
744*7c478bd9Sstevel@tonic-gate 	{'-',':'}, {'\'','9'},{'"','9'}, {'>','>'},
745*7c478bd9Sstevel@tonic-gate 	{'1','4'}, {'1','2'}, {'3','4'}, {'?','I'}
746*7c478bd9Sstevel@tonic-gate #else
747*7c478bd9Sstevel@tonic-gate 	{'N','S'}, {'!','I'}, {'C','t'}, {'P','d'},
748*7c478bd9Sstevel@tonic-gate 	{'D','O'}, {'Y','e'}, {'C','u'}, {'S','E'},
749*7c478bd9Sstevel@tonic-gate 	{'X','O'}, {'\'','6'},{'"','6'}, {'<','<'},
750*7c478bd9Sstevel@tonic-gate 	{'<','-'}, {'-','!'}, {'-','>'}, {'-','v'},
751*7c478bd9Sstevel@tonic-gate 	{'D','G'}, {'+','-'}, {'2','S'}, {'3','S'},
752*7c478bd9Sstevel@tonic-gate 	{'*','X'}, {'M','y'}, {'P','I'}, {'.','M'},
753*7c478bd9Sstevel@tonic-gate 	{'-',':'}, {'\'','9'},{'"','9'}, {'>','>'},
754*7c478bd9Sstevel@tonic-gate 	{'1','4'}, {'1','2'}, {'3','4'}, {'?','I'}
755*7c478bd9Sstevel@tonic-gate #endif
756*7c478bd9Sstevel@tonic-gate };
757*7c478bd9Sstevel@tonic-gate 
758*7c478bd9Sstevel@tonic-gate /*
759*7c478bd9Sstevel@tonic-gate --- T.61 characters [0xE0 .. 0xFF] -----------------
760*7c478bd9Sstevel@tonic-gate */
761*7c478bd9Sstevel@tonic-gate static Couple trans_t61b_iso8859[48] = {
762*7c478bd9Sstevel@tonic-gate #if (ISO_8859 == 1)
763*7c478bd9Sstevel@tonic-gate 	{'-','M'}, {0xb9,0},  {0xae,0},  {0xa9,0},
764*7c478bd9Sstevel@tonic-gate 	{'T','M'}, {'M','8'}, {0xac,0},  {0xa6,0},
765*7c478bd9Sstevel@tonic-gate 	{0,0},     {0,0},     {0,0},     {0,0},
766*7c478bd9Sstevel@tonic-gate 	{'1','8'}, {'3','8'}, {'5','8'}, {'7','8'},
767*7c478bd9Sstevel@tonic-gate 	{'O','m'}, {0xc6,0},  {0xd0,0},  {0xaa,0},
768*7c478bd9Sstevel@tonic-gate 	{'H','/'}, {0,0},     {'I','J'}, {'L','.'},
769*7c478bd9Sstevel@tonic-gate 	{'L','/'}, {0xd8,0},  {'O','E'}, {0xba,0},
770*7c478bd9Sstevel@tonic-gate 	{0xde,0},  {'T','/'}, {'N','G'}, {'\'','n'},
771*7c478bd9Sstevel@tonic-gate 	{'k','k'}, {0xe6,0},  {'d','/'}, {0xf0,0},
772*7c478bd9Sstevel@tonic-gate 	{'h','/'}, {'i','.'}, {'i','j'}, {'l','.'},
773*7c478bd9Sstevel@tonic-gate 	{'l','/'}, {0xf8,0},  {'o','e'}, {0xdf,0},
774*7c478bd9Sstevel@tonic-gate 	{0xfe,0},  {'t','/'}, {'n','g'}, {'-','-'}
775*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 2)
776*7c478bd9Sstevel@tonic-gate 	{'-','M'}, {'1','S'}, {'R','g'}, {'C','o'},
777*7c478bd9Sstevel@tonic-gate 	{'T','M'}, {'M','8'}, {'N','O'}, {'B','B'},
778*7c478bd9Sstevel@tonic-gate 	{0,0},     {0,0},     {0,0},     {0,0},
779*7c478bd9Sstevel@tonic-gate 	{'1','8'}, {'3','8'}, {'5','8'}, {'7','8'},
780*7c478bd9Sstevel@tonic-gate 	{'O','m'}, {'A','E'}, {0xd0,0},  {'-','a'},
781*7c478bd9Sstevel@tonic-gate 	{'H','/'}, {0,0},     {'I','J'}, {'L','.'},
782*7c478bd9Sstevel@tonic-gate 	{0xa3,0},  {'O','/'}, {'O','E'}, {'-','o'},
783*7c478bd9Sstevel@tonic-gate 	{'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'},
784*7c478bd9Sstevel@tonic-gate 	{'k','k'}, {'a','e'}, {0xf0,0},  {'d','-'},
785*7c478bd9Sstevel@tonic-gate 	{'h','/'}, {'i','.'}, {'i','j'}, {'l','.'},
786*7c478bd9Sstevel@tonic-gate 	{0xb3,0},  {'o','/'}, {'o','e'}, {0xdf,0},
787*7c478bd9Sstevel@tonic-gate 	{'t','h'}, {'t','/'}, {'n','g'}, {'-','-'}
788*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 3)
789*7c478bd9Sstevel@tonic-gate 	{'-','M'}, {'1','S'}, {'R','g'}, {'C','o'},
790*7c478bd9Sstevel@tonic-gate 	{'T','M'}, {'M','8'}, {'N','O'}, {'B','B'},
791*7c478bd9Sstevel@tonic-gate 	{0,0},     {0,0},     {0,0},     {0,0},
792*7c478bd9Sstevel@tonic-gate 	{'1','8'}, {'3','8'}, {'5','8'}, {'7','8'},
793*7c478bd9Sstevel@tonic-gate 	{'O','m'}, {'A','E'}, {'D','/'}, {'-','a'},
794*7c478bd9Sstevel@tonic-gate 	{0xa1,0},  {0,0},     {'I','J'}, {'L','.'},
795*7c478bd9Sstevel@tonic-gate 	{'L','/'}, {'O','/'}, {'O','E'}, {'-','o'},
796*7c478bd9Sstevel@tonic-gate 	{'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'},
797*7c478bd9Sstevel@tonic-gate 	{'k','k'}, {'a','e'}, {'d','/'}, {'d','-'},
798*7c478bd9Sstevel@tonic-gate 	{0xb1,0},  {0xb9,0},  {'i','j'}, {'l','.'},
799*7c478bd9Sstevel@tonic-gate 	{'l','/'}, {'o','/'}, {'o','e'}, {0xdf,0},
800*7c478bd9Sstevel@tonic-gate 	{'t','h'}, {'t','/'}, {'n','g'}, {'-','-'}
801*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 4)
802*7c478bd9Sstevel@tonic-gate 	{'-','M'}, {'1','S'}, {'R','g'}, {'C','o'},
803*7c478bd9Sstevel@tonic-gate 	{'T','M'}, {'M','8'}, {'N','O'}, {'B','B'},
804*7c478bd9Sstevel@tonic-gate 	{0,0},     {0,0},     {0,0},     {0,0},
805*7c478bd9Sstevel@tonic-gate 	{'1','8'}, {'3','8'}, {'5','8'}, {'7','8'},
806*7c478bd9Sstevel@tonic-gate 	{'O','m'}, {0xc6,0},  {0xd0,0},  {'-','a'},
807*7c478bd9Sstevel@tonic-gate 	{'H','/'}, {0,0},     {'I','J'}, {'L','.'},
808*7c478bd9Sstevel@tonic-gate 	{'L','/'}, {0xd8,0},  {'O','E'}, {'-','o'},
809*7c478bd9Sstevel@tonic-gate 	{'T','H'}, {0xac,0},  {0xbd,0},  {'\'','n'},
810*7c478bd9Sstevel@tonic-gate 	{0xa2,0},  {0xe6,0},  {0xf0,0},  {'d','-'},
811*7c478bd9Sstevel@tonic-gate 	{'h','/'}, {'i','.'}, {'i','j'}, {'l','.'},
812*7c478bd9Sstevel@tonic-gate 	{'l','/'}, {0xf8,0},  {'o','e'}, {0xdf,0},
813*7c478bd9Sstevel@tonic-gate 	{'t','h'}, {0xbc,0},  {0xbf,0},  {'-','-'}
814*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 9)
815*7c478bd9Sstevel@tonic-gate 	{'-','M'}, {0xb9,0},  {0xae,0},  {0xa9,0},
816*7c478bd9Sstevel@tonic-gate 	{'T','M'}, {'M','8'}, {0xac,0},  {0xa6,0},
817*7c478bd9Sstevel@tonic-gate 	{0,0},     {0,0},     {0,0},     {0,0},
818*7c478bd9Sstevel@tonic-gate 	{'1','8'}, {'3','8'}, {'5','8'}, {'7','8'},
819*7c478bd9Sstevel@tonic-gate 	{'O','m'}, {0xc6,0},  {'D','/'}, {0xaa,0},
820*7c478bd9Sstevel@tonic-gate 	{'H','/'}, {0,0},     {'I','J'}, {'L','.'},
821*7c478bd9Sstevel@tonic-gate 	{'L','/'}, {0xd8,0},  {'O','E'}, {0xba,0},
822*7c478bd9Sstevel@tonic-gate 	{'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'},
823*7c478bd9Sstevel@tonic-gate 	{'k','k'}, {0xe6,0},  {'d','/'}, {'d','-'},
824*7c478bd9Sstevel@tonic-gate 	{'h','/'}, {0xfd,0},  {'i','j'}, {'l','.'},
825*7c478bd9Sstevel@tonic-gate 	{'l','/'}, {0xf8,0},  {'o','e'}, {0xdf,0},
826*7c478bd9Sstevel@tonic-gate 	{'t','h'}, {'t','/'}, {'n','g'}, {'-','-'}
827*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 10)
828*7c478bd9Sstevel@tonic-gate 	{0xbd,0},  {'1','S'}, {'R','g'}, {'C','o'},
829*7c478bd9Sstevel@tonic-gate 	{'T','M'}, {'M','8'}, {'N','O'}, {'B','B'},
830*7c478bd9Sstevel@tonic-gate 	{0,0},     {0,0},     {0,0},     {0,0},
831*7c478bd9Sstevel@tonic-gate 	{'1','8'}, {'3','8'}, {'5','8'}, {'7','8'},
832*7c478bd9Sstevel@tonic-gate 	{'O','m'}, {0xc6,0},  {0xa9,0},  {'-','a'},
833*7c478bd9Sstevel@tonic-gate 	{'H','/'}, {0,0},     {'I','J'}, {'L','.'},
834*7c478bd9Sstevel@tonic-gate 	{'L','/'}, {0xd8,0},  {'O','E'}, {'-','o'},
835*7c478bd9Sstevel@tonic-gate 	{0xde,0},  {0xab,0},  {0xaf,0},  {'\'','n'},
836*7c478bd9Sstevel@tonic-gate 	{0xff,0},  {0xe6,0},  {0xb9,0},  {0xf0,0},
837*7c478bd9Sstevel@tonic-gate 	{'h','/'}, {'i','.'}, {'i','j'}, {'l','.'},
838*7c478bd9Sstevel@tonic-gate 	{'l','/'}, {0xf8,0},  {'o','e'}, {0xdf,0},
839*7c478bd9Sstevel@tonic-gate 	{0xfe,0},  {0xbb,0},  {0xbf,0},  {'-','-'}
840*7c478bd9Sstevel@tonic-gate #else
841*7c478bd9Sstevel@tonic-gate 	{'-','M'}, {'1','S'}, {'R','g'}, {'C','o'},
842*7c478bd9Sstevel@tonic-gate 	{'T','M'}, {'M','8'}, {'N','O'}, {'B','B'},
843*7c478bd9Sstevel@tonic-gate 	{0,0},     {0,0},     {0,0},     {0,0},
844*7c478bd9Sstevel@tonic-gate 	{'1','8'}, {'3','8'}, {'5','8'}, {'7','8'},
845*7c478bd9Sstevel@tonic-gate 	{'O','m'}, {'A','E'}, {'D','/'}, {'-','a'},
846*7c478bd9Sstevel@tonic-gate 	{'H','/'}, {0,0},     {'I','J'}, {'L','.'},
847*7c478bd9Sstevel@tonic-gate 	{'L','/'}, {'O','/'}, {'O','E'}, {'-','o'},
848*7c478bd9Sstevel@tonic-gate 	{'T','H'}, {'T','/'}, {'N','G'}, {'\'','n'},
849*7c478bd9Sstevel@tonic-gate 	{'k','k'}, {'a','e'}, {'d','/'}, {'d','-'},
850*7c478bd9Sstevel@tonic-gate 	{'h','/'}, {'i','.'}, {'i','j'}, {'l','.'},
851*7c478bd9Sstevel@tonic-gate 	{'l','/'}, {'o','/'}, {'o','e'}, {'s','s'},
852*7c478bd9Sstevel@tonic-gate 	{'t','h'}, {'t','-'}, {'n','g'}, {'-','-'}
853*7c478bd9Sstevel@tonic-gate #endif
854*7c478bd9Sstevel@tonic-gate };
855*7c478bd9Sstevel@tonic-gate 
856*7c478bd9Sstevel@tonic-gate /*
857*7c478bd9Sstevel@tonic-gate --- ISO 8859-n characters <0xA0 .. 0xFF> -------------------
858*7c478bd9Sstevel@tonic-gate */
859*7c478bd9Sstevel@tonic-gate #if (ISO_8859 == 1)
860*7c478bd9Sstevel@tonic-gate static Couple trans_iso8859_t61[96] = {
861*7c478bd9Sstevel@tonic-gate 	{0xa0,0},     {0xa1,0},     {0xa2,0},     {0xa3,0},
862*7c478bd9Sstevel@tonic-gate 	{0xa8,0},     {0xa5,0},     {0xd7,0},     {0xa7,0},
863*7c478bd9Sstevel@tonic-gate 	{0xc8,ALONE}, {0xd3,0},     {0xe3,0},     {0xab,0},
864*7c478bd9Sstevel@tonic-gate 	{0xd6,0},     {0xff,0},     {0xd2,0},     {0xc5,ALONE},
865*7c478bd9Sstevel@tonic-gate 	{0xb0,0},     {0xb1,0},     {0xb2,0},     {0xb3,0},
866*7c478bd9Sstevel@tonic-gate 	{0xc2,ALONE}, {0xb5,0},     {0xb6,0},     {0xb7,0},
867*7c478bd9Sstevel@tonic-gate 	{0xcb,ALONE}, {0xd1,0},     {0xeb,0},     {0xbb,0},
868*7c478bd9Sstevel@tonic-gate 	{0xbc,0},     {0xbd,0},     {0xbe,0},     {0xbf,0},
869*7c478bd9Sstevel@tonic-gate 	{0xc1,'A'},   {0xc2,'A'},   {0xc3,'A'},   {0xc4,'A'},
870*7c478bd9Sstevel@tonic-gate 	{0xc8,'A'},   {0xca,'A'},   {0xe1,0},     {0xcb,'C'},
871*7c478bd9Sstevel@tonic-gate 	{0xc1,'E'},   {0xc2,'E'},   {0xc3,'E'},   {0xc8,'E'},
872*7c478bd9Sstevel@tonic-gate 	{0xc1,'I'},   {0xc2,'I'},   {0xc3,'I'},   {0xc8,'I'},
873*7c478bd9Sstevel@tonic-gate 	{0xe2,0},     {0xc4,'N'},   {0xc1,'O'},   {0xc2,'O'},
874*7c478bd9Sstevel@tonic-gate 	{0xc3,'O'},   {0xc4,'O'},   {0xc8,'O'},   {0xb4,0},
875*7c478bd9Sstevel@tonic-gate 	{0xe9,0},     {0xc1,'U'},   {0xc2,'U'},   {0xc3,'U'},
876*7c478bd9Sstevel@tonic-gate 	{0xc8,'U'},   {0xc2,'Y'},   {0xec,0},     {0xfb,0},
877*7c478bd9Sstevel@tonic-gate 	{0xc1,'a'},   {0xc2,'a'},   {0xc3,'a'},   {0xc4,'a'},
878*7c478bd9Sstevel@tonic-gate 	{0xc8,'a'},   {0xca,'a'},   {0xf1,0},     {0xcb,'c'},
879*7c478bd9Sstevel@tonic-gate 	{0xc1,'e'},   {0xc2,'e'},   {0xc3,'e'},   {0xc8,'e'},
880*7c478bd9Sstevel@tonic-gate 	{0xc1,'i'},   {0xc2,'i'},   {0xc3,'i'},   {0xc8,'i'},
881*7c478bd9Sstevel@tonic-gate 	{0xf3,0},     {0xc4,'n'},   {0xc1,'o'},   {0xc2,'o'},
882*7c478bd9Sstevel@tonic-gate 	{0xc3,'o'},   {0xc4,'o'},   {0xc8,'o'},   {0xb8,0},
883*7c478bd9Sstevel@tonic-gate 	{0xf9,0},     {0xc1,'u'},   {0xc2,'u'},   {0xc3,'u'},
884*7c478bd9Sstevel@tonic-gate 	{0xc8,'u'},   {0xc2,'y'},   {0xfc,0},     {0xc8,'y'}
885*7c478bd9Sstevel@tonic-gate };
886*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 2)
887*7c478bd9Sstevel@tonic-gate static Couple trans_iso8859_t61[96] = {
888*7c478bd9Sstevel@tonic-gate 	{0xa0,0},     {0xce,'A'},   {0xc6,ALONE}, {0xe8,0},
889*7c478bd9Sstevel@tonic-gate 	{0xa8,0},     {0xcf,'L'},   {0xc2,'S'},   {0xa7,0},
890*7c478bd9Sstevel@tonic-gate 	{0xc8,ALONE}, {0xcf,'S'},   {0xcb,'S'},   {0xcf,'T'},
891*7c478bd9Sstevel@tonic-gate 	{0xc2,'Z'},   {0xff,0},     {0xcf,'Z'},   {0xc7,'Z'},
892*7c478bd9Sstevel@tonic-gate 	{0xb0,0},     {0xce,'a'},   {0xce,ALONE}, {0xf8,0},
893*7c478bd9Sstevel@tonic-gate 	{0xc2,ALONE}, {0xcf,'l'},   {0xc2,'s'},   {0xcf,ALONE},
894*7c478bd9Sstevel@tonic-gate 	{0xcb,ALONE}, {0xcf,'s'},   {0xcb,'s'},   {0xcf,'t'},
895*7c478bd9Sstevel@tonic-gate 	{0xc2,'z'},   {0xcd,ALONE}, {0xcf,'z'},   {0xc7,'z'},
896*7c478bd9Sstevel@tonic-gate 	{0xc2,'R'},   {0xc2,'A'},   {0xc3,'A'},   {0xc6,'A'},
897*7c478bd9Sstevel@tonic-gate 	{0xc8,'A'},   {0xc2,'L'},   {0xc2,'C'},   {0xcb,'C'},
898*7c478bd9Sstevel@tonic-gate 	{0xcf,'C'},   {0xc2,'E'},   {0xce,'E'},   {0xc8,'E'},
899*7c478bd9Sstevel@tonic-gate 	{0xcf,'E'},   {0xc2,'I'},   {0xc3,'I'},   {0xcf,'D'},
900*7c478bd9Sstevel@tonic-gate 	{0xe2,0},     {0xc2,'N'},   {0xcf,'N'},   {0xc2,'O'},
901*7c478bd9Sstevel@tonic-gate 	{0xc3,'O'},   {0xcd,'O'},   {0xc8,'O'},   {0xb4,0},
902*7c478bd9Sstevel@tonic-gate 	{0xcf,'R'},   {0xca,'U'},   {0xc2,'U'},   {0xcd,'U'},
903*7c478bd9Sstevel@tonic-gate 	{0xc8,'U'},   {0xc2,'Y'},   {0xcb,'T'},   {0xfb,0},
904*7c478bd9Sstevel@tonic-gate 	{0xc2,'r'},   {0xc2,'a'},   {0xc3,'a'},   {0xc6,'a'},
905*7c478bd9Sstevel@tonic-gate 	{0xc8,'a'},   {0xc2,'l'},   {0xc2,'c'},   {0xcb,'c'},
906*7c478bd9Sstevel@tonic-gate 	{0xcf,'c'},   {0xc2,'e'},   {0xce,'e'},   {0xc8,'e'},
907*7c478bd9Sstevel@tonic-gate 	{0xcf,'e'},   {0xc2,'i'},   {0xc3,'i'},   {0xcf,'d'},
908*7c478bd9Sstevel@tonic-gate 	{0xf2,0},     {0xc2,'n'},   {0xcf,'n'},   {0xc2,'o'},
909*7c478bd9Sstevel@tonic-gate 	{0xc3,'o'},   {0xcd,'o'},   {0xc8,'o'},   {0xb8,0},
910*7c478bd9Sstevel@tonic-gate 	{0xcf,'r'},   {0xca,'u'},   {0xc2,'u'},   {0xcd,'u'},
911*7c478bd9Sstevel@tonic-gate 	{0xc8,'u'},   {0xc2,'y'},   {0xcb,'t'},   {0xc7,ALONE}
912*7c478bd9Sstevel@tonic-gate };
913*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 3)
914*7c478bd9Sstevel@tonic-gate static Couple trans_iso8859_t61[96] = {
915*7c478bd9Sstevel@tonic-gate 	{0xa0,0},     {0xe4,0},     {0xc6,ALONE}, {0xa3,0},
916*7c478bd9Sstevel@tonic-gate 	{0xa8,0},     {0,0},        {0xc3,'H'},   {0xa7,0},
917*7c478bd9Sstevel@tonic-gate 	{0xc8,ALONE}, {0xc7,'I'},   {0xcb,'S'},   {0xc6,'G'},
918*7c478bd9Sstevel@tonic-gate 	{0xc3,'J'},   {0xff,0},     {0,0},        {0xc7,'Z'},
919*7c478bd9Sstevel@tonic-gate 	{0xb0,0},     {0xf4,0},     {0xb2,0},     {0xb3,0},
920*7c478bd9Sstevel@tonic-gate 	{0xc2,ALONE}, {0xb5,0},     {0xc3,'h'},   {0xb7,0},
921*7c478bd9Sstevel@tonic-gate 	{0xcb,ALONE}, {0xf5,0},     {0xcb,'s'},   {0xc6,'g'},
922*7c478bd9Sstevel@tonic-gate 	{0xc3,'j'},   {0xbd,0},     {0,0},        {0xc7,'z'},
923*7c478bd9Sstevel@tonic-gate 	{0xc1,'A'},   {0xc2,'A'},   {0xc3,'A'},   {0,0},
924*7c478bd9Sstevel@tonic-gate 	{0xc8,'A'},   {0xc7,'C'},   {0xc3,'C'},   {0xcb,'C'},
925*7c478bd9Sstevel@tonic-gate 	{0xc1,'E'},   {0xc2,'E'},   {0xc3,'E'},   {0xc8,'E'},
926*7c478bd9Sstevel@tonic-gate 	{0xc1,'I'},   {0xc2,'I'},   {0xc3,'I'},   {0xc8,'I'},
927*7c478bd9Sstevel@tonic-gate 	{0,0},        {0xc4,'N'},   {0xc1,'O'},   {0xc2,'O'},
928*7c478bd9Sstevel@tonic-gate 	{0xc3,'O'},   {0xc7,'G'},   {0xc8,'O'},   {0xb4,0},
929*7c478bd9Sstevel@tonic-gate 	{0xc3,'G'},   {0xc1,'U'},   {0xc2,'U'},   {0xc3,'U'},
930*7c478bd9Sstevel@tonic-gate 	{0xc8,'U'},   {0xc6,'U'},   {0xc3,'S'},   {0xfb,0},
931*7c478bd9Sstevel@tonic-gate 	{0xc1,'a'},   {0xc2,'a'},   {0xc3,'a'},   {0,0},
932*7c478bd9Sstevel@tonic-gate 	{0xc8,'a'},   {0xc7,'c'},   {0xc3,'c'},   {0xcb,'c'},
933*7c478bd9Sstevel@tonic-gate 	{0xc1,'e'},   {0xc2,'e'},   {0xc3,'e'},   {0xc8,'e'},
934*7c478bd9Sstevel@tonic-gate 	{0xc1,'i'},   {0xc2,'i'},   {0xc3,'i'},   {0xc8,'i'},
935*7c478bd9Sstevel@tonic-gate 	{0,0},        {0xc4,'n'},   {0xc1,'o'},   {0xc2,'o'},
936*7c478bd9Sstevel@tonic-gate 	{0xc3,'o'},   {0xc7,'g'},   {0xc8,'o'},   {0xb8,0},
937*7c478bd9Sstevel@tonic-gate 	{0xc3,'g'},   {0xc1,'u'},   {0xc2,'u'},   {0xc3,'u'},
938*7c478bd9Sstevel@tonic-gate 	{0xc8,'u'},   {0xc6,'u'},   {0xc3,'s'},   {0xc7,ALONE}
939*7c478bd9Sstevel@tonic-gate };
940*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 4)
941*7c478bd9Sstevel@tonic-gate static Couple trans_iso8859_t61[96] = {
942*7c478bd9Sstevel@tonic-gate 	{0xa0,0},     {0xce,'A'},   {0xf0,0},     {0xcb,'R'},
943*7c478bd9Sstevel@tonic-gate 	{0xa8,0},     {0xc4,'I'},   {0xcb,'L'},   {0xa7,0},
944*7c478bd9Sstevel@tonic-gate 	{0xc8,ALONE}, {0xcf,'S'},   {0xc5,'E'},   {0xcb,'G'},
945*7c478bd9Sstevel@tonic-gate 	{0xed,0},     {0xff,0},     {0xcf,'Z'},   {0xc5,ALONE},
946*7c478bd9Sstevel@tonic-gate 	{0xb0,0},     {0xce,'a'},   {0xce,ALONE}, {0xcb,'r'},
947*7c478bd9Sstevel@tonic-gate 	{0xc2,ALONE}, {0xc4,'i'},   {0xcb,'l'},   {0xcf,ALONE},
948*7c478bd9Sstevel@tonic-gate 	{0xcb,ALONE}, {0xcf,'s'},   {0xc5,'e'},   {0xcb,'g'},
949*7c478bd9Sstevel@tonic-gate 	{0xfd,0},     {0xee,0},     {0xcf,'z'},   {0xfe,0},
950*7c478bd9Sstevel@tonic-gate 	{0xc5,'A'},   {0xc2,'A'},   {0xc3,'A'},   {0xc4,'A'},
951*7c478bd9Sstevel@tonic-gate 	{0xc8,'A'},   {0xca,'A'},   {0xe1,0},     {0xce,'I'},
952*7c478bd9Sstevel@tonic-gate 	{0xcf,'C'},   {0xc2,'E'},   {0xce,'E'},   {0xc8,'E'},
953*7c478bd9Sstevel@tonic-gate 	{0xc7,'E'},   {0xc2,'I'},   {0xc3,'I'},   {0xc5,'I'},
954*7c478bd9Sstevel@tonic-gate 	{0xe2,0},     {0xcb,'N'},   {0xc5,'O'},   {0xcb,'K'},
955*7c478bd9Sstevel@tonic-gate 	{0xc3,'O'},   {0xc4,'O'},   {0xc8,'O'},   {0xb4,0},
956*7c478bd9Sstevel@tonic-gate 	{0xe9,0},     {0xce,'U'},   {0xc2,'U'},   {0xc3,'U'},
957*7c478bd9Sstevel@tonic-gate 	{0xc8,'U'},   {0xc4,'U'},   {0xc5,'U'},   {0xfb,0},
958*7c478bd9Sstevel@tonic-gate 	{0xc5,'a'},   {0xc2,'a'},   {0xc3,'a'},   {0xc4,'a'},
959*7c478bd9Sstevel@tonic-gate 	{0xc8,'a'},   {0xca,'a'},   {0xf1,0},     {0xce,'i'},
960*7c478bd9Sstevel@tonic-gate 	{0xcf,'c'},   {0xc2,'e'},   {0xce,'e'},   {0xc8,'e'},
961*7c478bd9Sstevel@tonic-gate 	{0xc7,'e'},   {0xc2,'i'},   {0xc3,'i'},   {0xc5,'i'},
962*7c478bd9Sstevel@tonic-gate 	{0xf2,0},     {0xcb,'n'},   {0xc5,'o'},   {0xcb,'k'},
963*7c478bd9Sstevel@tonic-gate 	{0xc3,'o'},   {0xc4,'o'},   {0xc8,'o'},   {0xb8,0},
964*7c478bd9Sstevel@tonic-gate 	{0xf9,0},     {0xce,'u'},   {0xc2,'u'},   {0xc3,'u'},
965*7c478bd9Sstevel@tonic-gate 	{0xc8,'u'},   {0xc4,'u'},   {0xc5,'u'},   {0xc7,ALONE}
966*7c478bd9Sstevel@tonic-gate };
967*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 9)
968*7c478bd9Sstevel@tonic-gate static Couple trans_iso8859_t61[96] = {
969*7c478bd9Sstevel@tonic-gate 	{0xa0,0},     {0xa1,0},     {0xa2,0},     {0xa3,0},
970*7c478bd9Sstevel@tonic-gate 	{0xa8,0},     {0xa5,0},     {0xd7,0},     {0xa7,0},
971*7c478bd9Sstevel@tonic-gate 	{0xc8,ALONE}, {0xd3,0},     {0xe3,0},     {0xab,0},
972*7c478bd9Sstevel@tonic-gate 	{0xd6,0},     {0xff,0},     {0xd2,0},     {0xc5,ALONE},
973*7c478bd9Sstevel@tonic-gate 	{0xb0,0},     {0xb1,0},     {0xb2,0},     {0xb3,0},
974*7c478bd9Sstevel@tonic-gate 	{0xc2,ALONE}, {0xb5,0},     {0xb6,0},     {0xb7,0},
975*7c478bd9Sstevel@tonic-gate 	{0xcb,ALONE}, {0xd1,0},     {0xeb,0},     {0xbb,0},
976*7c478bd9Sstevel@tonic-gate 	{0xbc,0},     {0xbd,0},     {0xbe,0},     {0xbf,0},
977*7c478bd9Sstevel@tonic-gate 	{0xc1,'A'},   {0xc2,'A'},   {0xc3,'A'},   {0xc4,'A'},
978*7c478bd9Sstevel@tonic-gate 	{0xc8,'A'},   {0xca,'A'},   {0xe1,0},     {0xcb,'C'},
979*7c478bd9Sstevel@tonic-gate 	{0xc1,'E'},   {0xc2,'E'},   {0xc3,'E'},   {0xc8,'E'},
980*7c478bd9Sstevel@tonic-gate 	{0xc1,'I'},   {0xc2,'I'},   {0xc3,'I'},   {0xc8,'I'},
981*7c478bd9Sstevel@tonic-gate 	{0xc6,'G'},   {0xc4,'N'},   {0xc1,'O'},   {0xc2,'O'},
982*7c478bd9Sstevel@tonic-gate 	{0xc3,'O'},   {0xc4,'O'},   {0xc8,'O'},   {0xb4,0},
983*7c478bd9Sstevel@tonic-gate 	{0xe9,0},     {0xc1,'U'},   {0xc2,'U'},   {0xc3,'U'},
984*7c478bd9Sstevel@tonic-gate 	{0xc8,'U'},   {0xc7,'I'},   {0xcb,'S'},   {0xfb,0},
985*7c478bd9Sstevel@tonic-gate 	{0xc1,'a'},   {0xc2,'a'},   {0xc3,'a'},   {0xc4,'a'},
986*7c478bd9Sstevel@tonic-gate 	{0xc8,'a'},   {0xca,'a'},   {0xf1,0},     {0xcb,'c'},
987*7c478bd9Sstevel@tonic-gate 	{0xc1,'e'},   {0xc2,'e'},   {0xce,'e'},   {0xc8,'e'},
988*7c478bd9Sstevel@tonic-gate 	{0xc7,'e'},   {0xc2,'i'},   {0xc3,'i'},   {0xc5,'i'},
989*7c478bd9Sstevel@tonic-gate 	{0xc6,'g'},   {0xc4,'n'},   {0xc1,'o'},   {0xc2,'o'},
990*7c478bd9Sstevel@tonic-gate 	{0xc3,'o'},   {0xc4,'o'},   {0xc8,'o'},   {0xb8,0},
991*7c478bd9Sstevel@tonic-gate 	{0xf9,0},     {0xc1,'u'},   {0xc2,'u'},   {0xc3,'u'},
992*7c478bd9Sstevel@tonic-gate 	{0xc8,'u'},   {0xf5,0},     {0xcb,'s'},   {0xc8,'y'}
993*7c478bd9Sstevel@tonic-gate };
994*7c478bd9Sstevel@tonic-gate #elif (ISO_8859 == 10)
995*7c478bd9Sstevel@tonic-gate static Couple trans_iso8859_t61[96] = {
996*7c478bd9Sstevel@tonic-gate 	{0xa0,0},     {0xce,'A'},   {0xc5,'E'},   {0xcb,'G'},
997*7c478bd9Sstevel@tonic-gate 	{0xc5,'I'},   {0xc4,'I'},   {0xcb,'K'},   {0xa7,0},
998*7c478bd9Sstevel@tonic-gate 	{0xcb,'L'},   {0xe2,0},     {0xcf,'S'},   {0xed,0},
999*7c478bd9Sstevel@tonic-gate 	{0xcf,'Z'},   {0xff,0},     {0xc5,'U'},   {0xee,0},
1000*7c478bd9Sstevel@tonic-gate 	{0xb0,0},     {0xce,'a'},   {0xc5,'e'},   {0xcb,'g'},
1001*7c478bd9Sstevel@tonic-gate 	{0xc5,'i'},   {0xc4,'i'},   {0xcb,'k'},   {0xb7,0},
1002*7c478bd9Sstevel@tonic-gate 	{0xcb,'l'},   {0xf2,0},     {0xcf,'s'},   {0xfd,0},
1003*7c478bd9Sstevel@tonic-gate 	{0xcf,'z'},   {0xd0,0},     {0xc5,'u'},   {0xfe,0},
1004*7c478bd9Sstevel@tonic-gate 	{0xc5,'A'},   {0xc2,'A'},   {0xc3,'A'},   {0xc4,'A'},
1005*7c478bd9Sstevel@tonic-gate 	{0xc8,'A'},   {0xca,'A'},   {0xe1,0},     {0xce,'I'},
1006*7c478bd9Sstevel@tonic-gate 	{0xcf,'C'},   {0xc2,'E'},   {0xce,'E'},   {0xc8,'E'},
1007*7c478bd9Sstevel@tonic-gate 	{0xc7,'E'},   {0xc2,'I'},   {0xc3,'I'},   {0xc8,'I'},
1008*7c478bd9Sstevel@tonic-gate 	{0,0},        {0xcb,'N'},   {0xc5,'O'},   {0xc2,'O'},
1009*7c478bd9Sstevel@tonic-gate 	{0xc3,'O'},   {0xc4,'O'},   {0xc8,'O'},   {0xc4,'U'},
1010*7c478bd9Sstevel@tonic-gate 	{0xe9,0},     {0xce,'U'},   {0xc2,'U'},   {0xc3,'U'},
1011*7c478bd9Sstevel@tonic-gate 	{0xc8,'U'},   {0xc2,'Y'},   {0xec,0},     {0xfb,0},
1012*7c478bd9Sstevel@tonic-gate 	{0xc5,'a'},   {0xc2,'a'},   {0xc3,'a'},   {0xc4,'a'},
1013*7c478bd9Sstevel@tonic-gate 	{0xc8,'a'},   {0xca,'a'},   {0xf1,0},     {0xce,'i'},
1014*7c478bd9Sstevel@tonic-gate 	{0xcf,'c'},   {0xc2,'e'},   {0xce,'e'},   {0xc8,'e'},
1015*7c478bd9Sstevel@tonic-gate 	{0xc7,'e'},   {0xc2,'i'},   {0xc3,'i'},   {0xc8,'i'},
1016*7c478bd9Sstevel@tonic-gate 	{0xf3,0},     {0xcb,'n'},   {0xc5,'o'},   {0xc2,'o'},
1017*7c478bd9Sstevel@tonic-gate 	{0xc3,'o'},   {0xc4,'o'},   {0xc8,'o'},   {0xc4,'u'},
1018*7c478bd9Sstevel@tonic-gate 	{0xf9,0},     {0xce,'u'},   {0xc2,'u'},   {0xc3,'u'},
1019*7c478bd9Sstevel@tonic-gate 	{0xc8,'u'},   {0xc2,'y'},   {0xfc,0},     {0xf0,0}
1020*7c478bd9Sstevel@tonic-gate };
1021*7c478bd9Sstevel@tonic-gate #endif
1022*7c478bd9Sstevel@tonic-gate 
1023*7c478bd9Sstevel@tonic-gate 
1024*7c478bd9Sstevel@tonic-gate static Byte *
c_to_hh(Byte * o,Byte c)1025*7c478bd9Sstevel@tonic-gate c_to_hh( Byte *o, Byte c )
1026*7c478bd9Sstevel@tonic-gate {
1027*7c478bd9Sstevel@tonic-gate   Byte n;
1028*7c478bd9Sstevel@tonic-gate 
1029*7c478bd9Sstevel@tonic-gate   *o++ = '{'; *o++ = 'x';
1030*7c478bd9Sstevel@tonic-gate   n = c >> 4;
1031*7c478bd9Sstevel@tonic-gate   *o++ = ((n < 0xA) ? '0' : 'A' - 0xA) + n;
1032*7c478bd9Sstevel@tonic-gate   n = c & 0x0F;
1033*7c478bd9Sstevel@tonic-gate   *o++ = ((n < 0xA) ? '0' : 'A' - 0xA) + n;
1034*7c478bd9Sstevel@tonic-gate   *o++ = '}';
1035*7c478bd9Sstevel@tonic-gate   return o;
1036*7c478bd9Sstevel@tonic-gate }
1037*7c478bd9Sstevel@tonic-gate 
1038*7c478bd9Sstevel@tonic-gate 
1039*7c478bd9Sstevel@tonic-gate static Byte *
c_to_cc(Byte * o,Couple * cc,Byte c)1040*7c478bd9Sstevel@tonic-gate c_to_cc( Byte *o, Couple *cc, Byte c )
1041*7c478bd9Sstevel@tonic-gate {
1042*7c478bd9Sstevel@tonic-gate   if ( (*cc).a != 0 ) {
1043*7c478bd9Sstevel@tonic-gate     if ( (*cc).b == 0 )
1044*7c478bd9Sstevel@tonic-gate       *o++ = (*cc).a;
1045*7c478bd9Sstevel@tonic-gate     else {
1046*7c478bd9Sstevel@tonic-gate       *o++ = '{';
1047*7c478bd9Sstevel@tonic-gate       *o++ = (*cc).a;
1048*7c478bd9Sstevel@tonic-gate       *o++ = (*cc).b;
1049*7c478bd9Sstevel@tonic-gate       *o++ = '}';
1050*7c478bd9Sstevel@tonic-gate     }
1051*7c478bd9Sstevel@tonic-gate     return o;
1052*7c478bd9Sstevel@tonic-gate   }
1053*7c478bd9Sstevel@tonic-gate   else
1054*7c478bd9Sstevel@tonic-gate     return c_to_hh( o, c );
1055*7c478bd9Sstevel@tonic-gate }
1056*7c478bd9Sstevel@tonic-gate 
1057*7c478bd9Sstevel@tonic-gate /* --- routine to convert from T.61 to ISO 8859-n --- */
1058*7c478bd9Sstevel@tonic-gate 
1059*7c478bd9Sstevel@tonic-gate int
ldap_t61_to_8859(char ** bufp,unsigned long * buflenp,int free_input)1060*7c478bd9Sstevel@tonic-gate ldap_t61_to_8859( char **bufp, unsigned long *buflenp, int free_input )
1061*7c478bd9Sstevel@tonic-gate {
1062*7c478bd9Sstevel@tonic-gate   Byte		*s, *oo, *o;
1063*7c478bd9Sstevel@tonic-gate   unsigned int  n;
1064*7c478bd9Sstevel@tonic-gate   int           c;
1065*7c478bd9Sstevel@tonic-gate   unsigned long len;
1066*7c478bd9Sstevel@tonic-gate   Couple        *cc;
1067*7c478bd9Sstevel@tonic-gate 
1068*7c478bd9Sstevel@tonic-gate   LDAPDebug( LDAP_DEBUG_TRACE, "ldap_t61_to_8859 input length: %ld\n",
1069*7c478bd9Sstevel@tonic-gate 	*buflenp, 0, 0 );
1070*7c478bd9Sstevel@tonic-gate 
1071*7c478bd9Sstevel@tonic-gate   len = *buflenp;
1072*7c478bd9Sstevel@tonic-gate   s = (Byte *) *bufp;
1073*7c478bd9Sstevel@tonic-gate 
1074*7c478bd9Sstevel@tonic-gate   if ( (o = oo = (Byte *)NSLDAPI_MALLOC( 2 * len + 64 )) == NULL ) {
1075*7c478bd9Sstevel@tonic-gate         return( 1 );
1076*7c478bd9Sstevel@tonic-gate   }
1077*7c478bd9Sstevel@tonic-gate 
1078*7c478bd9Sstevel@tonic-gate   while ( (char *)s - *(char **)bufp < len ) {
1079*7c478bd9Sstevel@tonic-gate     switch ( *s >> 4 ) {
1080*7c478bd9Sstevel@tonic-gate 
1081*7c478bd9Sstevel@tonic-gate     case 0xA: case 0xB:
1082*7c478bd9Sstevel@tonic-gate       o = c_to_cc( o, &trans_t61a_iso8859[ *s - 0xA0 ], *s );
1083*7c478bd9Sstevel@tonic-gate       s++;
1084*7c478bd9Sstevel@tonic-gate       break;
1085*7c478bd9Sstevel@tonic-gate 
1086*7c478bd9Sstevel@tonic-gate     case 0xD: case 0xE: case 0xF:
1087*7c478bd9Sstevel@tonic-gate       o = c_to_cc( o, &trans_t61b_iso8859[ *s - 0xD0 ], *s );
1088*7c478bd9Sstevel@tonic-gate       s++;
1089*7c478bd9Sstevel@tonic-gate       break;
1090*7c478bd9Sstevel@tonic-gate 
1091*7c478bd9Sstevel@tonic-gate     case 0xC:
1092*7c478bd9Sstevel@tonic-gate       if ( (*s == 0xC0) || (*s == 0xC9) || (*s == 0xCC) ) {
1093*7c478bd9Sstevel@tonic-gate         o = c_to_hh( o, *s++ );
1094*7c478bd9Sstevel@tonic-gate         break;
1095*7c478bd9Sstevel@tonic-gate       }
1096*7c478bd9Sstevel@tonic-gate 
1097*7c478bd9Sstevel@tonic-gate       n = (*s++) - 0xC0;
1098*7c478bd9Sstevel@tonic-gate       switch ( *s ) {
1099*7c478bd9Sstevel@tonic-gate 
1100*7c478bd9Sstevel@tonic-gate       case 'A':  c = letter_w_diacritic[n][0]; break;
1101*7c478bd9Sstevel@tonic-gate       case 'C':  c = letter_w_diacritic[n][1]; break;
1102*7c478bd9Sstevel@tonic-gate       case 'D':  c = letter_w_diacritic[n][2]; break;
1103*7c478bd9Sstevel@tonic-gate       case 'E':  c = letter_w_diacritic[n][3]; break;
1104*7c478bd9Sstevel@tonic-gate       case 'G':  c = letter_w_diacritic[n][4]; break;
1105*7c478bd9Sstevel@tonic-gate       case 'H':  c = letter_w_diacritic[n][5]; break;
1106*7c478bd9Sstevel@tonic-gate       case 'I':  c = letter_w_diacritic[n][6]; break;
1107*7c478bd9Sstevel@tonic-gate       case 'J':  c = letter_w_diacritic[n][7]; break;
1108*7c478bd9Sstevel@tonic-gate       case 'K':  c = letter_w_diacritic[n][8]; break;
1109*7c478bd9Sstevel@tonic-gate       case 'L':  c = letter_w_diacritic[n][9]; break;
1110*7c478bd9Sstevel@tonic-gate       case 'N':  c = letter_w_diacritic[n][10]; break;
1111*7c478bd9Sstevel@tonic-gate       case 'O':  c = letter_w_diacritic[n][11]; break;
1112*7c478bd9Sstevel@tonic-gate       case 'R':  c = letter_w_diacritic[n][12]; break;
1113*7c478bd9Sstevel@tonic-gate       case 'S':  c = letter_w_diacritic[n][13]; break;
1114*7c478bd9Sstevel@tonic-gate       case 'T':  c = letter_w_diacritic[n][14]; break;
1115*7c478bd9Sstevel@tonic-gate       case 'U':  c = letter_w_diacritic[n][15]; break;
1116*7c478bd9Sstevel@tonic-gate       case 'W':  c = letter_w_diacritic[n][16]; break;
1117*7c478bd9Sstevel@tonic-gate       case 'Y':  c = letter_w_diacritic[n][17]; break;
1118*7c478bd9Sstevel@tonic-gate       case 'Z':  c = letter_w_diacritic[n][18]; break;
1119*7c478bd9Sstevel@tonic-gate 
1120*7c478bd9Sstevel@tonic-gate       case 'a':  c = letter_w_diacritic[n][19]; break;
1121*7c478bd9Sstevel@tonic-gate       case 'c':  c = letter_w_diacritic[n][20]; break;
1122*7c478bd9Sstevel@tonic-gate       case 'd':  c = letter_w_diacritic[n][21]; break;
1123*7c478bd9Sstevel@tonic-gate       case 'e':  c = letter_w_diacritic[n][22]; break;
1124*7c478bd9Sstevel@tonic-gate       case 'g':  c = letter_w_diacritic[n][23]; break;
1125*7c478bd9Sstevel@tonic-gate       case 'h':  c = letter_w_diacritic[n][24]; break;
1126*7c478bd9Sstevel@tonic-gate       case 'i':  c = letter_w_diacritic[n][25]; break;
1127*7c478bd9Sstevel@tonic-gate       case 'j':  c = letter_w_diacritic[n][26]; break;
1128*7c478bd9Sstevel@tonic-gate       case 'k':  c = letter_w_diacritic[n][27]; break;
1129*7c478bd9Sstevel@tonic-gate       case 'l':  c = letter_w_diacritic[n][28]; break;
1130*7c478bd9Sstevel@tonic-gate       case 'n':  c = letter_w_diacritic[n][29]; break;
1131*7c478bd9Sstevel@tonic-gate       case 'o':  c = letter_w_diacritic[n][30]; break;
1132*7c478bd9Sstevel@tonic-gate       case 'r':  c = letter_w_diacritic[n][31]; break;
1133*7c478bd9Sstevel@tonic-gate       case 's':  c = letter_w_diacritic[n][32]; break;
1134*7c478bd9Sstevel@tonic-gate       case 't':  c = letter_w_diacritic[n][33]; break;
1135*7c478bd9Sstevel@tonic-gate       case 'u':  c = letter_w_diacritic[n][34]; break;
1136*7c478bd9Sstevel@tonic-gate       case 'w':  c = letter_w_diacritic[n][35]; break;
1137*7c478bd9Sstevel@tonic-gate       case 'y':  c = letter_w_diacritic[n][36]; break;
1138*7c478bd9Sstevel@tonic-gate       case 'z':  c = letter_w_diacritic[n][37]; break;
1139*7c478bd9Sstevel@tonic-gate 
1140*7c478bd9Sstevel@tonic-gate       case ALONE:  c = (( !diacritic[n].b ) ? diacritic[n].a : -1);
1141*7c478bd9Sstevel@tonic-gate                    break;
1142*7c478bd9Sstevel@tonic-gate 
1143*7c478bd9Sstevel@tonic-gate       default:   c = 0;
1144*7c478bd9Sstevel@tonic-gate       }
1145*7c478bd9Sstevel@tonic-gate 
1146*7c478bd9Sstevel@tonic-gate       if ( c > 0 ) {
1147*7c478bd9Sstevel@tonic-gate         *o++ = c;  s++;
1148*7c478bd9Sstevel@tonic-gate       } else {
1149*7c478bd9Sstevel@tonic-gate         *o++ = '{';
1150*7c478bd9Sstevel@tonic-gate         if ( c == -1 ) {
1151*7c478bd9Sstevel@tonic-gate           *o++ = ( ( *s == ALONE ) ? ' ' : *s );
1152*7c478bd9Sstevel@tonic-gate           s++;
1153*7c478bd9Sstevel@tonic-gate         } else {
1154*7c478bd9Sstevel@tonic-gate           *o++ = '"';
1155*7c478bd9Sstevel@tonic-gate         }
1156*7c478bd9Sstevel@tonic-gate         *o++ = diacritic[n].a;
1157*7c478bd9Sstevel@tonic-gate         *o++ = '}';
1158*7c478bd9Sstevel@tonic-gate       }
1159*7c478bd9Sstevel@tonic-gate       break;
1160*7c478bd9Sstevel@tonic-gate 
1161*7c478bd9S