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