KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > drda > CharacterEncodings


1 /*
2
3    Derby - Class org.apache.derby.impl.drda.CharacterEncodings
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.impl.drda;
23
24 final class CharacterEncodings
25 {
26
27   // This is a static class, so hide the default constructor.
28
private CharacterEncodings () {}
29
30   //private static java.util.Hashtable javaEncodingToCCSIDTable__ = new java.util.Hashtable();
31
private static java.util.Hashtable JavaDoc ccsidToJavaEncodingTable__ = new java.util.Hashtable JavaDoc();
32
33   static {
34     populate_ccsidToJavaEncodingTable();
35     //populate_javaEncodingToCCSIDTable();
36
}
37
38   /*
39   static void populate_javaEncodingToCCSIDTable ()
40   {
41     javaEncodingToCCSIDTable__.put ("Cp037", new Integer (37));
42     javaEncodingToCCSIDTable__.put ("Cp273", new Integer (273));
43     javaEncodingToCCSIDTable__.put ("Cp277", new Integer (277));
44     javaEncodingToCCSIDTable__.put ("Cp278", new Integer (278));
45     javaEncodingToCCSIDTable__.put ("Cp280", new Integer (280));
46     javaEncodingToCCSIDTable__.put ("Cp284", new Integer (284));
47     javaEncodingToCCSIDTable__.put ("Cp285", new Integer (285));
48     javaEncodingToCCSIDTable__.put ("Cp297", new Integer (297));
49     javaEncodingToCCSIDTable__.put ("Cp420", new Integer (420));
50     javaEncodingToCCSIDTable__.put ("Cp424", new Integer (424));
51     javaEncodingToCCSIDTable__.put ("Cp747", new Integer (437));
52     javaEncodingToCCSIDTable__.put ("Cp500", new Integer (500));
53     javaEncodingToCCSIDTable__.put ("Cp737", new Integer (737));
54     javaEncodingToCCSIDTable__.put ("Cp775", new Integer (775));
55     javaEncodingToCCSIDTable__.put ("ISO8859_7", new Integer (813));
56     javaEncodingToCCSIDTable__.put ("ISO8859_1", new Integer (819));
57     javaEncodingToCCSIDTable__.put ("Cp838", new Integer (838));
58     javaEncodingToCCSIDTable__.put ("Cp850", new Integer (850));
59     javaEncodingToCCSIDTable__.put ("Cp852", new Integer (852));
60     javaEncodingToCCSIDTable__.put ("Cp855", new Integer (855));
61     javaEncodingToCCSIDTable__.put ("Cp856", new Integer (856));
62     javaEncodingToCCSIDTable__.put ("Cp857", new Integer (857));
63     javaEncodingToCCSIDTable__.put ("Cp858", new Integer (858));
64     javaEncodingToCCSIDTable__.put ("Cp860", new Integer (860));
65     javaEncodingToCCSIDTable__.put ("Cp861", new Integer (861));
66     javaEncodingToCCSIDTable__.put ("Cp862", new Integer (862));
67     javaEncodingToCCSIDTable__.put ("Cp863", new Integer (863));
68     javaEncodingToCCSIDTable__.put ("Cp864", new Integer (864));
69     javaEncodingToCCSIDTable__.put ("Cp865", new Integer (865));
70     javaEncodingToCCSIDTable__.put ("Cp866", new Integer (866));
71     javaEncodingToCCSIDTable__.put ("Cp868", new Integer (868));
72     javaEncodingToCCSIDTable__.put ("Cp869", new Integer (869));
73     javaEncodingToCCSIDTable__.put ("Cp870", new Integer (870));
74     javaEncodingToCCSIDTable__.put ("Cp871", new Integer (871));
75     javaEncodingToCCSIDTable__.put ("Cp874", new Integer (874));
76     javaEncodingToCCSIDTable__.put ("Cp875", new Integer (875));
77     javaEncodingToCCSIDTable__.put ("KOI8_R", new Integer (878));
78     javaEncodingToCCSIDTable__.put ("ISO8859_2", new Integer (912));
79     javaEncodingToCCSIDTable__.put ("ISO8859_3", new Integer (913));
80     javaEncodingToCCSIDTable__.put ("ISO8859_4", new Integer (914));
81     javaEncodingToCCSIDTable__.put ("ISO8859_5", new Integer (915));
82     javaEncodingToCCSIDTable__.put ("ISO8859_8", new Integer (916));
83     javaEncodingToCCSIDTable__.put ("Cp918", new Integer (918));
84     javaEncodingToCCSIDTable__.put ("ISO8859_9", new Integer (920));
85     javaEncodingToCCSIDTable__.put ("ISO8859_15_FDIS", new Integer (923));
86     javaEncodingToCCSIDTable__.put ("Cp921", new Integer (921));
87     javaEncodingToCCSIDTable__.put ("Cp922", new Integer (922));
88     javaEncodingToCCSIDTable__.put ("Cp930", new Integer (930));
89     javaEncodingToCCSIDTable__.put ("Cp933", new Integer (933));
90     javaEncodingToCCSIDTable__.put ("Cp935", new Integer (935));
91     javaEncodingToCCSIDTable__.put ("Cp937", new Integer (937));
92     javaEncodingToCCSIDTable__.put ("Cp939", new Integer (939));
93     javaEncodingToCCSIDTable__.put ("Cp948", new Integer (948));
94     javaEncodingToCCSIDTable__.put ("Cp950", new Integer (950));
95     javaEncodingToCCSIDTable__.put ("Cp964", new Integer (964));
96     javaEncodingToCCSIDTable__.put ("Cp970", new Integer (970));
97     javaEncodingToCCSIDTable__.put ("Cp1006", new Integer (1006));
98     javaEncodingToCCSIDTable__.put ("Cp1025", new Integer (1025));
99     javaEncodingToCCSIDTable__.put ("Cp1026", new Integer (1026));
100     javaEncodingToCCSIDTable__.put ("Cp1046", new Integer (1046));
101     javaEncodingToCCSIDTable__.put ("ISO8859_6", new Integer (1089));
102     javaEncodingToCCSIDTable__.put ("Cp1097", new Integer (1097));
103     javaEncodingToCCSIDTable__.put ("Cp1098", new Integer (1098));
104     javaEncodingToCCSIDTable__.put ("Cp1112", new Integer (1112));
105     javaEncodingToCCSIDTable__.put ("Cp1122", new Integer (1122));
106     javaEncodingToCCSIDTable__.put ("Cp1123", new Integer (1123));
107     javaEncodingToCCSIDTable__.put ("Cp1124", new Integer (1124));
108     javaEncodingToCCSIDTable__.put ("Cp1140", new Integer (1140));
109     javaEncodingToCCSIDTable__.put ("Cp1141", new Integer (1141));
110     javaEncodingToCCSIDTable__.put ("Cp1142", new Integer (1142));
111     javaEncodingToCCSIDTable__.put ("Cp1143", new Integer (1143));
112     javaEncodingToCCSIDTable__.put ("Cp1144", new Integer (1144));
113     javaEncodingToCCSIDTable__.put ("Cp1145", new Integer (1145));
114     javaEncodingToCCSIDTable__.put ("Cp1146", new Integer (1146));
115     javaEncodingToCCSIDTable__.put ("Cp1147", new Integer (1147));
116     javaEncodingToCCSIDTable__.put ("Cp1148", new Integer (1148));
117     javaEncodingToCCSIDTable__.put ("Cp1149", new Integer (1149));
118     javaEncodingToCCSIDTable__.put ("UTF8", new Integer (1208));
119     javaEncodingToCCSIDTable__.put ("Cp1250", new Integer (1250));
120     javaEncodingToCCSIDTable__.put ("Cp1251", new Integer (1251));
121     javaEncodingToCCSIDTable__.put ("Cp1252", new Integer (1252));
122     javaEncodingToCCSIDTable__.put ("Cp1253", new Integer (1253));
123     javaEncodingToCCSIDTable__.put ("Cp1254", new Integer (1254));
124     javaEncodingToCCSIDTable__.put ("Cp1255", new Integer (1255));
125     javaEncodingToCCSIDTable__.put ("Cp1256", new Integer (1256));
126     javaEncodingToCCSIDTable__.put ("Cp1257", new Integer (1257));
127     javaEncodingToCCSIDTable__.put ("Cp1258", new Integer (1258));
128     javaEncodingToCCSIDTable__.put ("MacGreek", new Integer (1280));
129     javaEncodingToCCSIDTable__.put ("MacTurkish", new Integer (1281));
130     javaEncodingToCCSIDTable__.put ("MacCyrillic", new Integer (1283));
131     javaEncodingToCCSIDTable__.put ("MacCroatian", new Integer (1284));
132     javaEncodingToCCSIDTable__.put ("MacRomania", new Integer (1285));
133     javaEncodingToCCSIDTable__.put ("MacIceland", new Integer (1286));
134     javaEncodingToCCSIDTable__.put ("Cp1381", new Integer (1381));
135     javaEncodingToCCSIDTable__.put ("Cp1383", new Integer (1383));
136     javaEncodingToCCSIDTable__.put ("Cp33722", new Integer (33722));
137
138     javaEncodingToCCSIDTable__.put ("Cp290", new Integer (8482));
139     javaEncodingToCCSIDTable__.put ("Cp300", new Integer (16684));
140     javaEncodingToCCSIDTable__.put ("Cp930", new Integer (1390));
141     javaEncodingToCCSIDTable__.put ("Cp833", new Integer (13121));
142     javaEncodingToCCSIDTable__.put ("Cp834", new Integer (4930));
143     javaEncodingToCCSIDTable__.put ("Cp836", new Integer (13124));
144     javaEncodingToCCSIDTable__.put ("Cp837", new Integer (4933));
145     javaEncodingToCCSIDTable__.put ("Cp943", new Integer (941));
146     javaEncodingToCCSIDTable__.put ("Cp1027", new Integer (5123));
147     javaEncodingToCCSIDTable__.put ("Cp1043", new Integer (904));
148     javaEncodingToCCSIDTable__.put ("Cp1114", new Integer (5210));
149     javaEncodingToCCSIDTable__.put ("ASCII", new Integer (367));
150     javaEncodingToCCSIDTable__.put ("MS932", new Integer (932));
151     javaEncodingToCCSIDTable__.put ("UnicodeBigUnmarked", new Integer (1200));
152     javaEncodingToCCSIDTable__.put ("Cp943", new Integer (943));
153     javaEncodingToCCSIDTable__.put ("Cp1362", new Integer (1114));
154     javaEncodingToCCSIDTable__.put ("Cp301", new Integer (301));
155     javaEncodingToCCSIDTable__.put ("Cp1041", new Integer (1041));
156     javaEncodingToCCSIDTable__.put ("Cp1351", new Integer (1351));
157     javaEncodingToCCSIDTable__.put ("Cp1088", new Integer (1088));
158     javaEncodingToCCSIDTable__.put ("Cp951", new Integer (951));
159     javaEncodingToCCSIDTable__.put ("Cp971", new Integer (971));
160     javaEncodingToCCSIDTable__.put ("Cp1362", new Integer (1362));
161     javaEncodingToCCSIDTable__.put ("Cp1363", new Integer (1363));
162     javaEncodingToCCSIDTable__.put ("Cp1115", new Integer (1115));
163     javaEncodingToCCSIDTable__.put ("Cp1380", new Integer (1380));
164     javaEncodingToCCSIDTable__.put ("Cp1385", new Integer (1385));
165     javaEncodingToCCSIDTable__.put ("Cp947", new Integer (947));
166     javaEncodingToCCSIDTable__.put ("Cp942", new Integer (942));
167     javaEncodingToCCSIDTable__.put ("Cp897", new Integer (897));
168     javaEncodingToCCSIDTable__.put ("Cp949", new Integer (949));
169     javaEncodingToCCSIDTable__.put ("Cp1370", new Integer (1370));
170     javaEncodingToCCSIDTable__.put ("Cp927", new Integer (927));
171     javaEncodingToCCSIDTable__.put ("Cp1382", new Integer (1382));
172     javaEncodingToCCSIDTable__.put ("Cp1386", new Integer (1386));
173     javaEncodingToCCSIDTable__.put ("Cp835", new Integer (835));
174     javaEncodingToCCSIDTable__.put ("Cp1051", new Integer (1051));
175   }
176   */

177
178   static void populate_ccsidToJavaEncodingTable ()
179   {
180     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5346), "Cp1250");
181     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5347), "Cp1251");
182     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5348), "Cp1252");
183     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5349), "Cp1253");
184     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5350), "Cp1254");
185     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5351), "Cp1255");
186     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (4909), "Cp813");
187     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (858), "Cp850"); //we can't map 858 to Cp850 because 858 has Euro characters that Cp858 doesn't support
188
ccsidToJavaEncodingTable__.put (new Integer JavaDoc (872), "Cp855");
189     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (867), "Cp862");
190     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (17248), "Cp864");
191     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (808), "Cp866");
192     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1162), "Cp847");
193     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (9044), "Cp852");
194     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (9048), "Cp856");
195     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (9049), "Cp857");
196     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (9061), "Cp869");
197     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (901), "Cp921");
198     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (902), "Cp922");
199     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (21427), "Cp947");
200     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1370), "Cp950"); //we can't map 1370 to Cp1370 becasue 1370 has Euro character that Cp1370 doesn't support
201
ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5104), "Cp1008");
202     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (9238), "Cp1046");
203     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (848), "Cp1125");
204     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1163), "Cp1129");
205     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (849), "Cp1131");
206     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5352), "Cp1256");
207     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5353), "Cp1257");
208     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5354), "Cp1258");
209
210     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (37), "Cp037");
211     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (273), "Cp273");
212     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (277), "Cp277");
213     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (278), "Cp278");
214     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (280), "Cp280");
215     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (284), "Cp284");
216     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (285), "Cp285");
217     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (297), "Cp297");
218     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (420), "Cp420");
219     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (424), "Cp424");
220     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (437), "Cp437");
221     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (500), "Cp500");
222     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (737), "Cp737");
223     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (775), "Cp775");
224     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (838), "Cp838");
225     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (850), "Cp850");
226     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (852), "Cp852");
227     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (855), "Cp855");
228     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (856), "Cp856");
229     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (857), "Cp857");
230     //ccsidToJavaEncodingTable__.put (new Integer (858), "Cp858");
231
ccsidToJavaEncodingTable__.put (new Integer JavaDoc (860), "Cp860");
232     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (861), "Cp861");
233     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (862), "Cp862");
234     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (863), "Cp863");
235     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (864), "Cp864");
236     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (865), "Cp865");
237     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (866), "Cp866");
238     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (868), "Cp868");
239     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (869), "Cp869");
240     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (870), "Cp870");
241     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (871), "Cp871");
242     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (874), "Cp874");
243     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (875), "Cp875");
244     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (918), "Cp918");
245     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (921), "Cp921");
246     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (922), "Cp922");
247     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (930), "Cp930");
248     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (933), "Cp933");
249     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (935), "Cp935");
250     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (937), "Cp937");
251     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (939), "Cp939");
252     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (948), "Cp948");
253     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (950), "Cp950");
254     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (964), "Cp964");
255     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (970), "Cp970");
256     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1006), "Cp1006");
257     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1025), "Cp1025");
258     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1026), "Cp1026");
259     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1046), "Cp1046");
260     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1097), "Cp1097");
261     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1098), "Cp1098");
262     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1112), "Cp1112");
263     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1122), "Cp1122");
264     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1123), "Cp1123");
265     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1124), "Cp1124");
266     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1140), "Cp1140");
267     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1141), "Cp1141");
268     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1142), "Cp1142");
269     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1143), "Cp1143");
270     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1144), "Cp1144");
271     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1145), "Cp1145");
272     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1146), "Cp1146");
273     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1147), "Cp1147");
274     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1148), "Cp1148");
275     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1149), "Cp1149");
276     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1250), "Cp1250");
277     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1251), "Cp1251");
278     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1252), "Cp1252");
279     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1253), "Cp1253");
280     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1254), "Cp1254");
281     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1255), "Cp1255");
282     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1256), "Cp1256");
283     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1257), "Cp1257");
284     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1258), "Cp1258");
285     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1381), "Cp1381");
286     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1383), "Cp1383");
287     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (33722), "Cp33722");
288     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (943), "Cp943");
289     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1043), "Cp1043");
290
291     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (813), "ISO8859_7");
292     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (819), "ISO8859_1");
293     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (878), "KOI8_R");
294     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (912), "ISO8859_2");
295     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (913), "ISO8859_3");
296     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (914), "ISO8859_4");
297     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (915), "ISO8859_5");
298     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (916), "ISO8859_8");
299     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (920), "ISO8859_9");
300     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (923), "ISO8859_15_FDIS");
301     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1089), "ISO8859_6");
302     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1208), "UTF8");
303     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1280), "MacGreek");
304     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1281), "MacTurkish");
305     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1283), "MacCyrillic");
306     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1284), "MacCroatian");
307     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1285), "MacRomania");
308     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1286), "MacIceland");
309     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (8482), "Cp290");
310     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (16684), "Cp300");
311     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1390), "Cp930");
312     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (13121), "Cp833");
313     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (4930), "Cp834");
314     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (13124), "Cp836");
315     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (4933), "Cp837");
316     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (941), "Cp943");
317     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5123), "Cp1027");
318     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (904), "Cp1043");
319     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5210), "Cp1114");
320     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (367), "ASCII");
321     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (932), "MS932");
322     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1200), "UnicodeBigUnmarked");
323     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5026), "Cp930");
324     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1399), "Cp939");
325     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (4396), "Cp300");
326     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1388), "Cp935");
327     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1364), "Cp933");
328     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (5035), "Cp939");
329     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (28709), "Cp37");
330     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1114), "Cp1362");
331     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (954), "Cp33722");
332
333     //----the following codepages may only be supported by IBMSDk 1.3.1
334
ccsidToJavaEncodingTable__.put (new Integer JavaDoc (301), "Cp301");
335     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1041), "Cp1041");
336     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1351), "Cp1351");
337     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1088), "Cp1088");
338     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (951), "Cp951");
339     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (971), "Cp971");
340     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1362), "Cp1362");
341     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1363), "Cp1363");
342     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1115), "Cp1115");
343     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1380), "Cp1380");
344     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1386), "Cp1386");
345     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1385), "Cp1385");
346     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (947), "Cp947");
347     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (942), "Cp942");
348     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (897), "Cp897");
349     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (949), "Cp949");
350     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (927), "Cp927");
351     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1382), "Cp1382");
352     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (290), "Cp290");
353     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (300), "Cp300");
354     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1027), "Cp1027");
355     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (16686), "Cp16686");
356     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (833), "Cp833");
357     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (834), "Cp834");
358     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (836), "Cp836");
359     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (837), "Cp837");
360     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (835), "Cp835");
361     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (895), "Cp33722");
362     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (1051), "Cp1051");
363     ccsidToJavaEncodingTable__.put (new Integer JavaDoc (13488), "UnicodeBigUnmarked");
364
365   }
366
367   /*
368   public static int getCCSID (String javaEncoding) throws java.io.UnsupportedEncodingException
369   {
370     int ccsid = ((Integer) javaEncodingToCCSIDTable__.get (javaEncoding)).intValue();
371     if (ccsid == 0)
372       throw new java.io.UnsupportedEncodingException ("unsupported java encoding");
373     else
374       return ccsid;
375   }
376   */

377
378   public static String JavaDoc getJavaEncoding (int ccsid) throws java.io.UnsupportedEncodingException JavaDoc
379   {
380     String JavaDoc javaEncoding = (String JavaDoc) ccsidToJavaEncodingTable__.get (new Integer JavaDoc (ccsid));
381     if (javaEncoding == null)
382       throw new java.io.UnsupportedEncodingException JavaDoc ("unsupported ccsid");
383     else
384       return javaEncoding;
385   }
386 }
387
Popular Tags