001: /*
002:
003: Derby - Class org.apache.derby.impl.drda.CharacterEncodings
004:
005: Licensed to the Apache Software Foundation (ASF) under one or more
006: contributor license agreements. See the NOTICE file distributed with
007: this work for additional information regarding copyright ownership.
008: The ASF licenses this file to You under the Apache License, Version 2.0
009: (the "License"); you may not use this file except in compliance with
010: the License. You may obtain a copy of the License at
011:
012: http://www.apache.org/licenses/LICENSE-2.0
013:
014: Unless required by applicable law or agreed to in writing, software
015: distributed under the License is distributed on an "AS IS" BASIS,
016: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: See the License for the specific language governing permissions and
018: limitations under the License.
019:
020: */
021:
022: package org.apache.derby.impl.drda;
023:
024: final class CharacterEncodings {
025:
026: // This is a static class, so hide the default constructor.
027: private CharacterEncodings() {
028: }
029:
030: //private static java.util.Hashtable javaEncodingToCCSIDTable__ = new java.util.Hashtable();
031: private static java.util.Hashtable ccsidToJavaEncodingTable__ = new java.util.Hashtable();
032:
033: static {
034: populate_ccsidToJavaEncodingTable();
035: //populate_javaEncodingToCCSIDTable();
036: }
037:
038: /*
039: static void populate_javaEncodingToCCSIDTable ()
040: {
041: javaEncodingToCCSIDTable__.put ("Cp037", new Integer (37));
042: javaEncodingToCCSIDTable__.put ("Cp273", new Integer (273));
043: javaEncodingToCCSIDTable__.put ("Cp277", new Integer (277));
044: javaEncodingToCCSIDTable__.put ("Cp278", new Integer (278));
045: javaEncodingToCCSIDTable__.put ("Cp280", new Integer (280));
046: javaEncodingToCCSIDTable__.put ("Cp284", new Integer (284));
047: javaEncodingToCCSIDTable__.put ("Cp285", new Integer (285));
048: javaEncodingToCCSIDTable__.put ("Cp297", new Integer (297));
049: javaEncodingToCCSIDTable__.put ("Cp420", new Integer (420));
050: javaEncodingToCCSIDTable__.put ("Cp424", new Integer (424));
051: javaEncodingToCCSIDTable__.put ("Cp747", new Integer (437));
052: javaEncodingToCCSIDTable__.put ("Cp500", new Integer (500));
053: javaEncodingToCCSIDTable__.put ("Cp737", new Integer (737));
054: javaEncodingToCCSIDTable__.put ("Cp775", new Integer (775));
055: javaEncodingToCCSIDTable__.put ("ISO8859_7", new Integer (813));
056: javaEncodingToCCSIDTable__.put ("ISO8859_1", new Integer (819));
057: javaEncodingToCCSIDTable__.put ("Cp838", new Integer (838));
058: javaEncodingToCCSIDTable__.put ("Cp850", new Integer (850));
059: javaEncodingToCCSIDTable__.put ("Cp852", new Integer (852));
060: javaEncodingToCCSIDTable__.put ("Cp855", new Integer (855));
061: javaEncodingToCCSIDTable__.put ("Cp856", new Integer (856));
062: javaEncodingToCCSIDTable__.put ("Cp857", new Integer (857));
063: javaEncodingToCCSIDTable__.put ("Cp858", new Integer (858));
064: javaEncodingToCCSIDTable__.put ("Cp860", new Integer (860));
065: javaEncodingToCCSIDTable__.put ("Cp861", new Integer (861));
066: javaEncodingToCCSIDTable__.put ("Cp862", new Integer (862));
067: javaEncodingToCCSIDTable__.put ("Cp863", new Integer (863));
068: javaEncodingToCCSIDTable__.put ("Cp864", new Integer (864));
069: javaEncodingToCCSIDTable__.put ("Cp865", new Integer (865));
070: javaEncodingToCCSIDTable__.put ("Cp866", new Integer (866));
071: javaEncodingToCCSIDTable__.put ("Cp868", new Integer (868));
072: javaEncodingToCCSIDTable__.put ("Cp869", new Integer (869));
073: javaEncodingToCCSIDTable__.put ("Cp870", new Integer (870));
074: javaEncodingToCCSIDTable__.put ("Cp871", new Integer (871));
075: javaEncodingToCCSIDTable__.put ("Cp874", new Integer (874));
076: javaEncodingToCCSIDTable__.put ("Cp875", new Integer (875));
077: javaEncodingToCCSIDTable__.put ("KOI8_R", new Integer (878));
078: javaEncodingToCCSIDTable__.put ("ISO8859_2", new Integer (912));
079: javaEncodingToCCSIDTable__.put ("ISO8859_3", new Integer (913));
080: javaEncodingToCCSIDTable__.put ("ISO8859_4", new Integer (914));
081: javaEncodingToCCSIDTable__.put ("ISO8859_5", new Integer (915));
082: javaEncodingToCCSIDTable__.put ("ISO8859_8", new Integer (916));
083: javaEncodingToCCSIDTable__.put ("Cp918", new Integer (918));
084: javaEncodingToCCSIDTable__.put ("ISO8859_9", new Integer (920));
085: javaEncodingToCCSIDTable__.put ("ISO8859_15_FDIS", new Integer (923));
086: javaEncodingToCCSIDTable__.put ("Cp921", new Integer (921));
087: javaEncodingToCCSIDTable__.put ("Cp922", new Integer (922));
088: javaEncodingToCCSIDTable__.put ("Cp930", new Integer (930));
089: javaEncodingToCCSIDTable__.put ("Cp933", new Integer (933));
090: javaEncodingToCCSIDTable__.put ("Cp935", new Integer (935));
091: javaEncodingToCCSIDTable__.put ("Cp937", new Integer (937));
092: javaEncodingToCCSIDTable__.put ("Cp939", new Integer (939));
093: javaEncodingToCCSIDTable__.put ("Cp948", new Integer (948));
094: javaEncodingToCCSIDTable__.put ("Cp950", new Integer (950));
095: javaEncodingToCCSIDTable__.put ("Cp964", new Integer (964));
096: javaEncodingToCCSIDTable__.put ("Cp970", new Integer (970));
097: javaEncodingToCCSIDTable__.put ("Cp1006", new Integer (1006));
098: javaEncodingToCCSIDTable__.put ("Cp1025", new Integer (1025));
099: 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: ccsidToJavaEncodingTable__.put(new Integer(5346), "Cp1250");
180: ccsidToJavaEncodingTable__.put(new Integer(5347), "Cp1251");
181: ccsidToJavaEncodingTable__.put(new Integer(5348), "Cp1252");
182: ccsidToJavaEncodingTable__.put(new Integer(5349), "Cp1253");
183: ccsidToJavaEncodingTable__.put(new Integer(5350), "Cp1254");
184: ccsidToJavaEncodingTable__.put(new Integer(5351), "Cp1255");
185: ccsidToJavaEncodingTable__.put(new Integer(4909), "Cp813");
186: ccsidToJavaEncodingTable__.put(new Integer(858), "Cp850"); //we can't map 858 to Cp850 because 858 has Euro characters that Cp858 doesn't support
187: ccsidToJavaEncodingTable__.put(new Integer(872), "Cp855");
188: ccsidToJavaEncodingTable__.put(new Integer(867), "Cp862");
189: ccsidToJavaEncodingTable__.put(new Integer(17248), "Cp864");
190: ccsidToJavaEncodingTable__.put(new Integer(808), "Cp866");
191: ccsidToJavaEncodingTable__.put(new Integer(1162), "Cp847");
192: ccsidToJavaEncodingTable__.put(new Integer(9044), "Cp852");
193: ccsidToJavaEncodingTable__.put(new Integer(9048), "Cp856");
194: ccsidToJavaEncodingTable__.put(new Integer(9049), "Cp857");
195: ccsidToJavaEncodingTable__.put(new Integer(9061), "Cp869");
196: ccsidToJavaEncodingTable__.put(new Integer(901), "Cp921");
197: ccsidToJavaEncodingTable__.put(new Integer(902), "Cp922");
198: ccsidToJavaEncodingTable__.put(new Integer(21427), "Cp947");
199: ccsidToJavaEncodingTable__.put(new Integer(1370), "Cp950"); //we can't map 1370 to Cp1370 becasue 1370 has Euro character that Cp1370 doesn't support
200: ccsidToJavaEncodingTable__.put(new Integer(5104), "Cp1008");
201: ccsidToJavaEncodingTable__.put(new Integer(9238), "Cp1046");
202: ccsidToJavaEncodingTable__.put(new Integer(848), "Cp1125");
203: ccsidToJavaEncodingTable__.put(new Integer(1163), "Cp1129");
204: ccsidToJavaEncodingTable__.put(new Integer(849), "Cp1131");
205: ccsidToJavaEncodingTable__.put(new Integer(5352), "Cp1256");
206: ccsidToJavaEncodingTable__.put(new Integer(5353), "Cp1257");
207: ccsidToJavaEncodingTable__.put(new Integer(5354), "Cp1258");
208:
209: ccsidToJavaEncodingTable__.put(new Integer(37), "Cp037");
210: ccsidToJavaEncodingTable__.put(new Integer(273), "Cp273");
211: ccsidToJavaEncodingTable__.put(new Integer(277), "Cp277");
212: ccsidToJavaEncodingTable__.put(new Integer(278), "Cp278");
213: ccsidToJavaEncodingTable__.put(new Integer(280), "Cp280");
214: ccsidToJavaEncodingTable__.put(new Integer(284), "Cp284");
215: ccsidToJavaEncodingTable__.put(new Integer(285), "Cp285");
216: ccsidToJavaEncodingTable__.put(new Integer(297), "Cp297");
217: ccsidToJavaEncodingTable__.put(new Integer(420), "Cp420");
218: ccsidToJavaEncodingTable__.put(new Integer(424), "Cp424");
219: ccsidToJavaEncodingTable__.put(new Integer(437), "Cp437");
220: ccsidToJavaEncodingTable__.put(new Integer(500), "Cp500");
221: ccsidToJavaEncodingTable__.put(new Integer(737), "Cp737");
222: ccsidToJavaEncodingTable__.put(new Integer(775), "Cp775");
223: ccsidToJavaEncodingTable__.put(new Integer(838), "Cp838");
224: ccsidToJavaEncodingTable__.put(new Integer(850), "Cp850");
225: ccsidToJavaEncodingTable__.put(new Integer(852), "Cp852");
226: ccsidToJavaEncodingTable__.put(new Integer(855), "Cp855");
227: ccsidToJavaEncodingTable__.put(new Integer(856), "Cp856");
228: ccsidToJavaEncodingTable__.put(new Integer(857), "Cp857");
229: //ccsidToJavaEncodingTable__.put (new Integer (858), "Cp858");
230: ccsidToJavaEncodingTable__.put(new Integer(860), "Cp860");
231: ccsidToJavaEncodingTable__.put(new Integer(861), "Cp861");
232: ccsidToJavaEncodingTable__.put(new Integer(862), "Cp862");
233: ccsidToJavaEncodingTable__.put(new Integer(863), "Cp863");
234: ccsidToJavaEncodingTable__.put(new Integer(864), "Cp864");
235: ccsidToJavaEncodingTable__.put(new Integer(865), "Cp865");
236: ccsidToJavaEncodingTable__.put(new Integer(866), "Cp866");
237: ccsidToJavaEncodingTable__.put(new Integer(868), "Cp868");
238: ccsidToJavaEncodingTable__.put(new Integer(869), "Cp869");
239: ccsidToJavaEncodingTable__.put(new Integer(870), "Cp870");
240: ccsidToJavaEncodingTable__.put(new Integer(871), "Cp871");
241: ccsidToJavaEncodingTable__.put(new Integer(874), "Cp874");
242: ccsidToJavaEncodingTable__.put(new Integer(875), "Cp875");
243: ccsidToJavaEncodingTable__.put(new Integer(918), "Cp918");
244: ccsidToJavaEncodingTable__.put(new Integer(921), "Cp921");
245: ccsidToJavaEncodingTable__.put(new Integer(922), "Cp922");
246: ccsidToJavaEncodingTable__.put(new Integer(930), "Cp930");
247: ccsidToJavaEncodingTable__.put(new Integer(933), "Cp933");
248: ccsidToJavaEncodingTable__.put(new Integer(935), "Cp935");
249: ccsidToJavaEncodingTable__.put(new Integer(937), "Cp937");
250: ccsidToJavaEncodingTable__.put(new Integer(939), "Cp939");
251: ccsidToJavaEncodingTable__.put(new Integer(948), "Cp948");
252: ccsidToJavaEncodingTable__.put(new Integer(950), "Cp950");
253: ccsidToJavaEncodingTable__.put(new Integer(964), "Cp964");
254: ccsidToJavaEncodingTable__.put(new Integer(970), "Cp970");
255: ccsidToJavaEncodingTable__.put(new Integer(1006), "Cp1006");
256: ccsidToJavaEncodingTable__.put(new Integer(1025), "Cp1025");
257: ccsidToJavaEncodingTable__.put(new Integer(1026), "Cp1026");
258: ccsidToJavaEncodingTable__.put(new Integer(1046), "Cp1046");
259: ccsidToJavaEncodingTable__.put(new Integer(1097), "Cp1097");
260: ccsidToJavaEncodingTable__.put(new Integer(1098), "Cp1098");
261: ccsidToJavaEncodingTable__.put(new Integer(1112), "Cp1112");
262: ccsidToJavaEncodingTable__.put(new Integer(1122), "Cp1122");
263: ccsidToJavaEncodingTable__.put(new Integer(1123), "Cp1123");
264: ccsidToJavaEncodingTable__.put(new Integer(1124), "Cp1124");
265: ccsidToJavaEncodingTable__.put(new Integer(1140), "Cp1140");
266: ccsidToJavaEncodingTable__.put(new Integer(1141), "Cp1141");
267: ccsidToJavaEncodingTable__.put(new Integer(1142), "Cp1142");
268: ccsidToJavaEncodingTable__.put(new Integer(1143), "Cp1143");
269: ccsidToJavaEncodingTable__.put(new Integer(1144), "Cp1144");
270: ccsidToJavaEncodingTable__.put(new Integer(1145), "Cp1145");
271: ccsidToJavaEncodingTable__.put(new Integer(1146), "Cp1146");
272: ccsidToJavaEncodingTable__.put(new Integer(1147), "Cp1147");
273: ccsidToJavaEncodingTable__.put(new Integer(1148), "Cp1148");
274: ccsidToJavaEncodingTable__.put(new Integer(1149), "Cp1149");
275: ccsidToJavaEncodingTable__.put(new Integer(1250), "Cp1250");
276: ccsidToJavaEncodingTable__.put(new Integer(1251), "Cp1251");
277: ccsidToJavaEncodingTable__.put(new Integer(1252), "Cp1252");
278: ccsidToJavaEncodingTable__.put(new Integer(1253), "Cp1253");
279: ccsidToJavaEncodingTable__.put(new Integer(1254), "Cp1254");
280: ccsidToJavaEncodingTable__.put(new Integer(1255), "Cp1255");
281: ccsidToJavaEncodingTable__.put(new Integer(1256), "Cp1256");
282: ccsidToJavaEncodingTable__.put(new Integer(1257), "Cp1257");
283: ccsidToJavaEncodingTable__.put(new Integer(1258), "Cp1258");
284: ccsidToJavaEncodingTable__.put(new Integer(1381), "Cp1381");
285: ccsidToJavaEncodingTable__.put(new Integer(1383), "Cp1383");
286: ccsidToJavaEncodingTable__.put(new Integer(33722), "Cp33722");
287: ccsidToJavaEncodingTable__.put(new Integer(943), "Cp943");
288: ccsidToJavaEncodingTable__.put(new Integer(1043), "Cp1043");
289:
290: ccsidToJavaEncodingTable__.put(new Integer(813), "ISO8859_7");
291: ccsidToJavaEncodingTable__.put(new Integer(819), "ISO8859_1");
292: ccsidToJavaEncodingTable__.put(new Integer(878), "KOI8_R");
293: ccsidToJavaEncodingTable__.put(new Integer(912), "ISO8859_2");
294: ccsidToJavaEncodingTable__.put(new Integer(913), "ISO8859_3");
295: ccsidToJavaEncodingTable__.put(new Integer(914), "ISO8859_4");
296: ccsidToJavaEncodingTable__.put(new Integer(915), "ISO8859_5");
297: ccsidToJavaEncodingTable__.put(new Integer(916), "ISO8859_8");
298: ccsidToJavaEncodingTable__.put(new Integer(920), "ISO8859_9");
299: ccsidToJavaEncodingTable__.put(new Integer(923),
300: "ISO8859_15_FDIS");
301: ccsidToJavaEncodingTable__.put(new Integer(1089), "ISO8859_6");
302: ccsidToJavaEncodingTable__.put(new Integer(1208), "UTF8");
303: ccsidToJavaEncodingTable__.put(new Integer(1280), "MacGreek");
304: ccsidToJavaEncodingTable__.put(new Integer(1281), "MacTurkish");
305: ccsidToJavaEncodingTable__
306: .put(new Integer(1283), "MacCyrillic");
307: ccsidToJavaEncodingTable__
308: .put(new Integer(1284), "MacCroatian");
309: ccsidToJavaEncodingTable__.put(new Integer(1285), "MacRomania");
310: ccsidToJavaEncodingTable__.put(new Integer(1286), "MacIceland");
311: ccsidToJavaEncodingTable__.put(new Integer(8482), "Cp290");
312: ccsidToJavaEncodingTable__.put(new Integer(16684), "Cp300");
313: ccsidToJavaEncodingTable__.put(new Integer(1390), "Cp930");
314: ccsidToJavaEncodingTable__.put(new Integer(13121), "Cp833");
315: ccsidToJavaEncodingTable__.put(new Integer(4930), "Cp834");
316: ccsidToJavaEncodingTable__.put(new Integer(13124), "Cp836");
317: ccsidToJavaEncodingTable__.put(new Integer(4933), "Cp837");
318: ccsidToJavaEncodingTable__.put(new Integer(941), "Cp943");
319: ccsidToJavaEncodingTable__.put(new Integer(5123), "Cp1027");
320: ccsidToJavaEncodingTable__.put(new Integer(904), "Cp1043");
321: ccsidToJavaEncodingTable__.put(new Integer(5210), "Cp1114");
322: ccsidToJavaEncodingTable__.put(new Integer(367), "ASCII");
323: ccsidToJavaEncodingTable__.put(new Integer(932), "MS932");
324: ccsidToJavaEncodingTable__.put(new Integer(1200),
325: "UnicodeBigUnmarked");
326: ccsidToJavaEncodingTable__.put(new Integer(5026), "Cp930");
327: ccsidToJavaEncodingTable__.put(new Integer(1399), "Cp939");
328: ccsidToJavaEncodingTable__.put(new Integer(4396), "Cp300");
329: ccsidToJavaEncodingTable__.put(new Integer(1388), "Cp935");
330: ccsidToJavaEncodingTable__.put(new Integer(1364), "Cp933");
331: ccsidToJavaEncodingTable__.put(new Integer(5035), "Cp939");
332: ccsidToJavaEncodingTable__.put(new Integer(28709), "Cp37");
333: ccsidToJavaEncodingTable__.put(new Integer(1114), "Cp1362");
334: ccsidToJavaEncodingTable__.put(new Integer(954), "Cp33722");
335:
336: //----the following codepages may only be supported by IBMSDk 1.3.1
337: ccsidToJavaEncodingTable__.put(new Integer(301), "Cp301");
338: ccsidToJavaEncodingTable__.put(new Integer(1041), "Cp1041");
339: ccsidToJavaEncodingTable__.put(new Integer(1351), "Cp1351");
340: ccsidToJavaEncodingTable__.put(new Integer(1088), "Cp1088");
341: ccsidToJavaEncodingTable__.put(new Integer(951), "Cp951");
342: ccsidToJavaEncodingTable__.put(new Integer(971), "Cp971");
343: ccsidToJavaEncodingTable__.put(new Integer(1362), "Cp1362");
344: ccsidToJavaEncodingTable__.put(new Integer(1363), "Cp1363");
345: ccsidToJavaEncodingTable__.put(new Integer(1115), "Cp1115");
346: ccsidToJavaEncodingTable__.put(new Integer(1380), "Cp1380");
347: ccsidToJavaEncodingTable__.put(new Integer(1386), "Cp1386");
348: ccsidToJavaEncodingTable__.put(new Integer(1385), "Cp1385");
349: ccsidToJavaEncodingTable__.put(new Integer(947), "Cp947");
350: ccsidToJavaEncodingTable__.put(new Integer(942), "Cp942");
351: ccsidToJavaEncodingTable__.put(new Integer(897), "Cp897");
352: ccsidToJavaEncodingTable__.put(new Integer(949), "Cp949");
353: ccsidToJavaEncodingTable__.put(new Integer(927), "Cp927");
354: ccsidToJavaEncodingTable__.put(new Integer(1382), "Cp1382");
355: ccsidToJavaEncodingTable__.put(new Integer(290), "Cp290");
356: ccsidToJavaEncodingTable__.put(new Integer(300), "Cp300");
357: ccsidToJavaEncodingTable__.put(new Integer(1027), "Cp1027");
358: ccsidToJavaEncodingTable__.put(new Integer(16686), "Cp16686");
359: ccsidToJavaEncodingTable__.put(new Integer(833), "Cp833");
360: ccsidToJavaEncodingTable__.put(new Integer(834), "Cp834");
361: ccsidToJavaEncodingTable__.put(new Integer(836), "Cp836");
362: ccsidToJavaEncodingTable__.put(new Integer(837), "Cp837");
363: ccsidToJavaEncodingTable__.put(new Integer(835), "Cp835");
364: ccsidToJavaEncodingTable__.put(new Integer(895), "Cp33722");
365: ccsidToJavaEncodingTable__.put(new Integer(1051), "Cp1051");
366: ccsidToJavaEncodingTable__.put(new Integer(13488),
367: "UnicodeBigUnmarked");
368:
369: }
370:
371: /*
372: public static int getCCSID (String javaEncoding) throws java.io.UnsupportedEncodingException
373: {
374: int ccsid = ((Integer) javaEncodingToCCSIDTable__.get (javaEncoding)).intValue();
375: if (ccsid == 0)
376: throw new java.io.UnsupportedEncodingException ("unsupported java encoding");
377: else
378: return ccsid;
379: }
380: */
381:
382: public static String getJavaEncoding(int ccsid)
383: throws java.io.UnsupportedEncodingException {
384: String javaEncoding = (String) ccsidToJavaEncodingTable__
385: .get(new Integer(ccsid));
386: if (javaEncoding == null)
387: throw new java.io.UnsupportedEncodingException(
388: "unsupported ccsid");
389: else
390: return javaEncoding;
391: }
392: }
|