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  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	SB_TO_UTF8_H
27 #define	SB_TO_UTF8_H
28 
29 
30 #include "common_defs.h"
31 
32 
33 /*
34  * The values in u8 data field is a UTF-8 byte streams saved in uint_t and
35  * with that data field, we only cover characters from U+0000 to U+10 FFFF.
36  */
37 static const to_utf8_table_component_t sb_u8_tbl[256] = {
38 #if defined(US_ASCII)
39 #include "tbls/us-ascii_to_utf8.tbl"
40 
41 #elif defined(ISO_8859_1)
42 #include "tbls/iso-8859-1_to_utf8.tbl"
43 
44 #elif defined(ISO_8859_2)
45 #include "tbls/iso-8859-2_to_utf8.tbl"
46 
47 #elif defined(ISO_8859_3)
48 #include "tbls/iso-8859-3_to_utf8.tbl"
49 
50 #elif defined(ISO_8859_4)
51 #include "tbls/iso-8859-4_to_utf8.tbl"
52 
53 #elif defined(ISO_8859_5)
54 #include "tbls/iso-8859-5_to_utf8.tbl"
55 
56 #elif defined(ISO_8859_6)
57 #include "tbls/iso-8859-6_to_utf8.tbl"
58 
59 #elif defined(ISO_8859_7)
60 #include "tbls/iso-8859-7_to_utf8.tbl"
61 
62 #elif defined(ISO_8859_8)
63 #include "tbls/iso-8859-8_to_utf8.tbl"
64 
65 #elif defined(ISO_8859_9)
66 #include "tbls/iso-8859-9_to_utf8.tbl"
67 
68 #elif defined(ISO_8859_10)
69 #include "tbls/iso-8859-10_to_utf8.tbl"
70 
71 #elif defined(ISO_8859_13)
72 #include "tbls/iso-8859-13_to_utf8.tbl"
73 
74 #elif defined(ISO_8859_14)
75 #include "tbls/iso-8859-14_to_utf8.tbl"
76 
77 #elif defined(ISO_8859_15)
78 #include "tbls/iso-8859-15_to_utf8.tbl"
79 
80 #elif defined(ISO_8859_16)
81 #include "tbls/iso-8859-16_to_utf8.tbl"
82 
83 #elif defined(KOI8_R)
84 #include "tbls/koi8-r_to_utf8.tbl"
85 
86 #elif defined(KOI8_U)
87 #include "tbls/koi8-u_to_utf8.tbl"
88 
89 #elif defined(PTCP154)
90 #include "tbls/ptcp154_to_utf8.tbl"
91 
92 #elif defined(CP437)
93 #include "tbls/cp437_to_utf8.tbl"
94 
95 #elif defined(CP720)
96 #include "tbls/cp720_to_utf8.tbl"
97 
98 #elif defined(CP737)
99 #include "tbls/cp737_to_utf8.tbl"
100 
101 #elif defined(CP775)
102 #include "tbls/cp775_to_utf8.tbl"
103 
104 #elif defined(CP850)
105 #include "tbls/cp850_to_utf8.tbl"
106 
107 #elif defined(CP852)
108 #include "tbls/cp852_to_utf8.tbl"
109 
110 #elif defined(CP855)
111 #include "tbls/cp855_to_utf8.tbl"
112 
113 #elif defined(CP857)
114 #include "tbls/cp857_to_utf8.tbl"
115 
116 #elif defined(CP860)
117 #include "tbls/cp860_to_utf8.tbl"
118 
119 #elif defined(CP861)
120 #include "tbls/cp861_to_utf8.tbl"
121 
122 #elif defined(CP862)
123 #include "tbls/cp862_to_utf8.tbl"
124 
125 #elif defined(CP863)
126 #include "tbls/cp863_to_utf8.tbl"
127 
128 #elif defined(CP864)
129 #include "tbls/cp864_to_utf8.tbl"
130 
131 #elif defined(CP865)
132 #include "tbls/cp865_to_utf8.tbl"
133 
134 #elif defined(CP866)
135 #include "tbls/cp866_to_utf8.tbl"
136 
137 #elif defined(CP869)
138 #include "tbls/cp869_to_utf8.tbl"
139 
140 #elif defined(CP874)
141 #include "tbls/cp874_to_utf8.tbl"
142 
143 #elif defined(CP1250)
144 #include "tbls/cp1250_to_utf8.tbl"
145 
146 #elif defined(CP1251)
147 #include "tbls/cp1251_to_utf8.tbl"
148 
149 #elif defined(CP1252)
150 #include "tbls/cp1252_to_utf8.tbl"
151 
152 #elif defined(CP1253)
153 #include "tbls/cp1253_to_utf8.tbl"
154 
155 #elif defined(CP1254)
156 #include "tbls/cp1254_to_utf8.tbl"
157 
158 #elif defined(CP1255)
159 #include "tbls/cp1255_to_utf8.tbl"
160 
161 #elif defined(CP1256)
162 #include "tbls/cp1256_to_utf8.tbl"
163 
164 #elif defined(CP1257)
165 #include "tbls/cp1257_to_utf8.tbl"
166 
167 #elif defined(CP1258)
168 #include "tbls/cp1258_to_utf8.tbl"
169 
170 #else
171 #error	"Error - nothing defined."
172 #endif
173 };
174 
175 #endif	/* SB_TO_UTF8_H */
176