Coverage Report

Created: 2025-10-10 06:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/w3m/libwc/ucs.map
Line
Count
Source
1
2
#include "map/jisx0201k_ucs.map"
3
#include "map/iso88591_ucs.map"
4
#include "map/iso88592_ucs.map"
5
#include "map/iso88593_ucs.map"
6
#include "map/iso88594_ucs.map"
7
#include "map/iso88595_ucs.map"
8
#include "map/iso88596_ucs.map"
9
#include "map/iso88597_ucs.map"
10
#include "map/iso88598_ucs.map"
11
#include "map/iso88599_ucs.map"
12
#include "map/iso885910_ucs.map"
13
#include "map/iso885911_ucs.map"
14
#include "map/iso885913_ucs.map"
15
#include "map/iso885914_ucs.map"
16
#include "map/iso885915_ucs.map"
17
#include "map/iso885916_ucs.map"
18
19
#include "map/cp437_ucs.map"
20
#include "map/cp737_ucs.map"
21
#include "map/cp775_ucs.map"
22
#include "map/cp850_ucs.map"
23
#include "map/cp852_ucs.map"
24
#include "map/cp855_ucs.map"
25
#include "map/cp856_ucs.map"
26
#include "map/cp857_ucs.map"
27
#include "map/cp860_ucs.map"
28
#include "map/cp861_ucs.map"
29
#include "map/cp862_ucs.map"
30
#include "map/cp863_ucs.map"
31
#include "map/cp864_ucs.map"
32
#include "map/cp865_ucs.map"
33
#include "map/cp866_ucs.map"
34
#include "map/cp869_ucs.map"
35
#include "map/cp874_ucs.map"
36
#include "map/cp1006_ucs.map"
37
#include "map/cp1250_ucs.map"
38
#include "map/cp1251_ucs.map"
39
#include "map/cp1252_ucs.map"
40
#include "map/cp1253_ucs.map"
41
#include "map/cp1254_ucs.map"
42
#include "map/cp1255_ucs.map"
43
#include "map/cp1256_ucs.map"
44
#include "map/cp1257_ucs.map"
45
#include "map/cp1258_ucs.map"
46
#include "map/tcvn5712_ucs.map"
47
#include "map/viscii11_ucs.map"
48
#include "map/vps_ucs.map"
49
#include "map/koi8r_ucs.map"
50
#include "map/koi8u_ucs.map"
51
#include "map/nextstep_ucs.map"
52
53
#include "map/jisx0208x0212x0213_ucs.map"
54
#include "map/jisx0213_ucs_p2.map"
55
#include "map/gb2312_ucs.map"
56
#include "map/cns11643_ucs.map"
57
#include "map/ksx1001_ucs.map"
58
#include "map/big5_ucs.map"
59
#include "map/hkscs_ucs.map"
60
#include "map/hkscs_ucs_p2.map"
61
#include "map/gb12345_ucs.map"
62
#include "map/johab_ucs.map"
63
#include "map/sjis_ext_ucs.map"
64
#include "map/gbk_ucs.map"
65
#include "map/uhc_ucs.map"
66
67
static wc_uint16 *cs94_ucs_map[] = {
68
  NULL,     /* 40 */
69
  NULL,     /* 41 */
70
  NULL,     /* 42 (US_ASCII) */
71
  NULL,     /* 43 */
72
  NULL,     /* 44 */
73
  NULL,     /* 45 */
74
  NULL,     /* 46 */
75
  NULL,     /* 47 */
76
  NULL,     /* 48 */
77
  jisx0201k_ucs_map,  /* 49 (JIS X 0201 Kana) */
78
  NULL,     /* 4A (JIS X 0201) */
79
  NULL,     /* 4B */
80
  NULL,     /* 4C */
81
  NULL,     /* 4D */
82
  NULL,     /* 4E */
83
  NULL,     /* 4F */
84
  NULL,     /* 50 */
85
  NULL,     /* 51 */
86
  NULL,     /* 52 */
87
  NULL,     /* 53 */
88
  NULL,     /* 54 (GB 1988) */
89
};
90
91
static wc_uint16 *cs96_ucs_map[] = {
92
  NULL,     /* 40 */
93
  iso88591_ucs_map, /* 41 (ISO 8859-1) */
94
  iso88592_ucs_map, /* 42 (ISO 8859-2) */
95
  iso88593_ucs_map, /* 43 (ISO 8859-3) */
96
  iso88594_ucs_map, /* 44 (ISO 8859-4) */
97
  NULL,     /* 45 */
98
  iso88597_ucs_map, /* 46 (ISO 8859-7) */
99
  iso88596_ucs_map, /* 47 (ISO 8859-6) */
100
  iso88598_ucs_map, /* 48 (ISO 8859-8) */
101
  NULL,     /* 49 */
102
  NULL,     /* 4A */
103
  NULL,     /* 4B */
104
  iso88595_ucs_map, /* 4C (ISO 8859-5) */
105
  iso88599_ucs_map, /* 4D (ISO 8859-9) */
106
  NULL,     /* 4E */
107
  NULL,     /* 4F */
108
  NULL,     /* 50 */
109
  NULL,     /* 51 */
110
  NULL,     /* 52 */
111
  NULL,     /* 53 */
112
  iso885911_ucs_map,  /* 54 (ISO 8859-11, TIS 620) */
113
  NULL,     /* 55 */
114
  iso885910_ucs_map,  /* 56 (ISO 8859-10) */
115
  NULL,     /* 57 */
116
  NULL,     /* 58 */
117
  iso885913_ucs_map,  /* 59 (ISO 8859-13) */
118
  NULL,     /* 5A */
119
  NULL,     /* 5B */
120
  NULL,     /* 5C */
121
  NULL,     /* 5D */
122
  NULL,     /* 5E */
123
  iso885914_ucs_map,  /* 5F (ISO 8859-14) */
124
  NULL,     /* 60 */
125
  NULL,     /* 61 */
126
  iso885915_ucs_map,  /* 62 (ISO 8859-15) */
127
  NULL,     /* 63 */
128
  NULL,     /* 64 */
129
  NULL,     /* 65 */
130
  iso885916_ucs_map,  /* 66 (ISO 8859-16) */
131
};
132
133
static wc_uint16 **cs942_ucs_map;
134
135
static wc_uint16 *pcs_ucs_map[] = {
136
  cp437_ucs_map,
137
  cp737_ucs_map,
138
  cp775_ucs_map,
139
  cp850_ucs_map,
140
  cp852_ucs_map,
141
  cp855_ucs_map,
142
  cp856_ucs_map,
143
  cp857_ucs_map,
144
  cp860_ucs_map,
145
  cp861_ucs_map,
146
  cp862_ucs_map,
147
  cp863_ucs_map,
148
  cp864_ucs_map,
149
  cp865_ucs_map,
150
  cp866_ucs_map,
151
  cp869_ucs_map,
152
  cp874_ucs_map,
153
  cp1006_ucs_map,
154
  cp1250_ucs_map,
155
  cp1251_ucs_map,
156
  cp1252_ucs_map,
157
  cp1253_ucs_map,
158
  cp1254_ucs_map,
159
  cp1255_ucs_map,
160
  cp1256_ucs_map,
161
  cp1257_ucs_map,
162
  cp1258_ucs_map,
163
  NULL,
164
  tcvn57121_ucs_map,
165
  tcvn57122_ucs_map,
166
  NULL,
167
  viscii111_ucs_map,
168
  viscii112_ucs_map,
169
  vps1_ucs_map,
170
  vps2_ucs_map,
171
  koi8r_ucs_map,
172
  koi8u_ucs_map,
173
  nextstep_ucs_map,
174
  NULL,
175
  NULL,     /* (Raw) */
176
};
177
178
static wc_uint32 pcs_ucs_map_size[] = {
179
  0x80,     /* cp437_ucs_map */
180
  0x80,     /* cp737_ucs_map */
181
  0x80,     /* cp775_ucs_map */
182
  0x80,     /* cp850_ucs_map */
183
  0x80,     /* cp852_ucs_map */
184
  0x80,     /* cp855_ucs_map */
185
  0x80,     /* cp856_ucs_map */
186
  0x80,     /* cp857_ucs_map */
187
  0x80,     /* cp860_ucs_map */
188
  0x80,     /* cp861_ucs_map */
189
  0x80,     /* cp862_ucs_map */
190
  0x80,     /* cp863_ucs_map */
191
  0x80,     /* cp864_ucs_map */
192
  0x80,     /* cp865_ucs_map */
193
  0x80,     /* cp866_ucs_map */
194
  0x80,     /* cp869_ucs_map */
195
  0x80,     /* cp874_ucs_map */
196
  0x80,     /* cp1006_ucs_map */
197
  0x80,     /* cp1250_ucs_map */
198
  0x80,     /* cp1251_ucs_map */
199
  0x80,     /* cp1252_ucs_map */
200
  0x80,     /* cp1253_ucs_map */
201
  0x80,     /* cp1254_ucs_map */
202
  0x80,     /* cp1255_ucs_map */
203
  0x80,     /* cp1256_ucs_map */
204
  0x80,     /* cp1257_ucs_map */
205
  0x80,     /* cp1258_ucs_map */
206
  0,      /* NULL */
207
  0x80,     /* tcvn57121_ucs_map */
208
  0x20,     /* tcvn57122_ucs_map */
209
  0,      /* NULL */
210
  0x80,     /* viscii111_ucs_map */
211
  0x20,     /* viscii112_ucs_map */
212
  0x80,     /* vps1_ucs_map */
213
  0x20,     /* vps2_ucs_map */
214
  0x80,     /* koi8r_ucs_map */
215
  0x80,     /* koi8u_ucs_map */
216
  0x80,     /* nextstep_ucs_map */
217
  0,      /* NULL */
218
  0,      /* NULL (Raw) */
219
};
220
221
static wc_uint16 *cs94w_ucs_map[] = {
222
  jisx0208x02131_ucs_map, /* 40 (JIS C 6226) */
223
  gb2312_ucs_map,   /* 41 (GB 2312) */
224
  jisx0208x02131_ucs_map, /* 42 (JIS X 0208) */
225
  ksx1001_ucs_map,    /* 43 (KS X 1001) */
226
  jisx0212x02132_ucs_map, /* 44 (JIS X 0212) */
227
  NULL,       /* 45 (ISO IR 165) */
228
  NULL,       /* 46 */
229
  cns116431_ucs_map,    /* 47 (CNS 11643-1) */
230
  cns116432_ucs_map,    /* 48 (CNS 11643-2) */
231
  NULL,       /* 49 (CNS 11643-3) */
232
  NULL,       /* 4A (CNS 11643-4) */
233
  NULL,       /* 4B (CNS 11643-5) */
234
  NULL,       /* 4C (CNS 11643-6) */
235
  NULL,       /* 4D (CNS 11643-7) */
236
  NULL,       /* 4E (KSP 9566) */
237
  jisx0208x02131_ucs_map, /* 4F (JIS X 0213-1) */
238
  jisx0212x02132_ucs_map, /* 50 (JIS X 0213-2) */
239
};
240
241
static wc_uint32 cs94w_ucs_map_size[] = {
242
  N_jisx0208x02131_ucs_map, /* 40 (JIS C 6226) */
243
  N_gb2312_ucs_map,   /* 41 (GB 2312) */
244
  N_jisx0208x02131_ucs_map, /* 42 (JIS X 0208) */
245
  N_ksx1001_ucs_map,    /* 43 (KS X 1001) */
246
  N_jisx0212x02132_ucs_map, /* 44 (JIS X 0212) */
247
  0,        /* 45 (ISO IR 165) */
248
  0,        /* 46 */
249
  N_cns116431_ucs_map,    /* 47 (CNS 11643-1) */
250
  N_cns116432_ucs_map,    /* 48 (CNS 11643-2) */
251
  0,        /* 49 (CNS 11643-3) */
252
  0,        /* 4A (CNS 11643-4) */
253
  0,        /* 4B (CNS 11643-5) */
254
  0,        /* 4C (CNS 11643-6) */
255
  0,        /* 4D (CNS 11643-7) */
256
  0,        /* 4E (KSP 9566) */
257
  N_jisx0208x02131_ucs_map, /* 4F (JIS X 0213-1) */
258
  N_jisx0212x02132_ucs_map, /* 50 (JIS X 0213-2) */
259
};
260
261
static wc_uint16 **cs96w_ucs_map;
262
static wc_uint32 *cs96w_ucs_map_size;
263
264
static wc_uint16 *pcsw_ucs_map[] = {
265
  big5_ucs_map,   /* Big5 */
266
  big5_ucs_map,   /* Big5-1 */
267
  big5_ucs_map,   /* Big5-2 */
268
  NULL,     /* CNS 11643-8 */
269
  NULL,     /* CNS 11643-9 */
270
  NULL,     /* CNS 11643-10 */
271
  NULL,     /* CNS 11643-11 */
272
  NULL,     /* CNS 11643-12 */
273
  NULL,     /* CNS 11643-13 */
274
  NULL,     /* CNS 11643-14 */
275
  NULL,     /* CNS 11643-15 */
276
  NULL,     /* CNS 11643-16 */
277
  NULL,     /* CNS 11643-X */
278
  gb12345_ucs_map,  /* GB 12345 */
279
  NULL,     /* Johab (special conversion) */
280
  NULL,     /* Johab-1 (special conversion) */
281
  NULL,     /* Johab-2 (special conversion) */
282
  ksx1001_ucs_map,  /* Johab-3 */
283
  sjis_ext_ucs_map, /* Shift_JIS(CP932) ext */
284
  sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-1 */
285
  sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-2 */
286
  gbk_ucs_map,    /* GBK(CP936) */
287
  gbk_ucs_map,    /* GBK(CP936)-1 */
288
  gbk_ucs_map,    /* GBK(CP936)-2 */
289
  NULL,     /* GB18030 GBK-ext (special conversion) */
290
  NULL,     /* GB18030 GBK-ext-1 (special conversion) */
291
  NULL,     /* GB18030 GBK-ext-2 (special conversion) */
292
  uhc_ucs_map,    /* UHC(CP949) */
293
  uhc_ucs_map,    /* UHC(CP949)-1 */
294
  uhc_ucs_map,    /* UHC(CP949)-2 */
295
  hkscs_ucs_map,  /* HKSCS */
296
  hkscs_ucs_map,  /* HKSCS-1 */
297
  hkscs_ucs_map,  /* HKSCS-2 */
298
};
299
300
static wc_uint32 pcsw_ucs_map_size[] = {
301
  N_big5_ucs_map, /* Big5 */
302
  N_big5_ucs_map, /* Big5-1 */
303
  N_big5_ucs_map, /* Big5-2 */
304
  0,      /* CNS 11643-8 */
305
  0,      /* CNS 11643-9 */
306
  0,      /* CNS 11643-10 */
307
  0,      /* CNS 11643-11 */
308
  0,      /* CNS 11643-12 */
309
  0,      /* CNS 11643-13 */
310
  0,      /* CNS 11643-14 */
311
  0,      /* CNS 11643-15 */
312
  0,      /* CNS 11643-16 */
313
  0,      /* CNS 11643-X */
314
  N_gb12345_ucs_map,  /* GB 12345 */
315
  0,      /* Johab (special conversion) */
316
  0,      /* Johab-1 (special conversion) */
317
  0,      /* Johab-2 (special conversion) */
318
  N_ksx1001_ucs_map,  /* Johab-3 */
319
  N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext */
320
  N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-1 */
321
  N_sjis_ext_ucs_map, /* Shift_JIS(CP932) ext-2 */
322
  N_gbk_ucs_map,  /* GBK(CP936) */
323
  N_gbk_ucs_map,  /* GBK(CP936)-1 */
324
  N_gbk_ucs_map,  /* GBK(CP936)-2 */
325
  0,      /* GB18030 GBK-ext (special conversion) */
326
  0,      /* GB18030 GBK-ext-1 (special conversion) */
327
  0,      /* GB18030 GBK-ext-2 (special conversion) */
328
  N_uhc_ucs_map,  /* UHC(CP949) */
329
  N_uhc_ucs_map,  /* UHC(CP949)-1 */
330
  N_uhc_ucs_map,  /* UHC(CP949)-2 */
331
  N_hkscs_ucs_map,  /* HKSCS */
332
  N_hkscs_ucs_map,  /* HKSCS-1 */
333
  N_hkscs_ucs_map,  /* HKSCS-2 */
334
};
335
336
static wc_wchar_t
337
ucs_cs94_conv(wc_ccs ccs, wc_uint16 c)
338
25.9M
{
339
25.9M
  wc_wchar_t cc;
340
341
25.9M
  cc.ccs = ccs;
342
25.9M
  cc.code = c;
343
25.9M
  return cc;
344
25.9M
}
345
346
#define ucs_cs96_conv ucs_cs94_conv
347
#define ucs_cs94w_conv ucs_cs94_conv
348
#define ucs_cs96w_conv ucs_cs94_conv
349
#define ucs_cs128w_conv ucs_cs94_conv
350
351
static wc_wchar_t
352
ucs_viet_conv(wc_ccs ccs, wc_uint16 c)
353
1.48M
{
354
1.48M
  wc_wchar_t cc;
355
356
1.48M
  if (c & 0x80) {
357
1.43M
    cc.ccs = ccs;
358
1.43M
    switch (ccs) {
359
0
    case WC_CCS_TCVN_5712_2:
360
0
  cc.ccs = WC_CCS_TCVN_5712_1;
361
0
  break;
362
0
    case WC_CCS_VISCII_11_2:
363
0
  cc.ccs = WC_CCS_VISCII_11_1;
364
0
  break;
365
0
    case WC_CCS_VPS_2:
366
0
  cc.ccs = WC_CCS_VPS_1;
367
0
  break;
368
1.43M
    }
369
1.43M
  } else {
370
41.9k
    cc.ccs = ccs;
371
41.9k
    switch (ccs) {
372
20.3k
    case WC_CCS_TCVN_5712_1:
373
20.3k
  cc.ccs = WC_CCS_TCVN_5712_2;
374
20.3k
  break;
375
1.79k
    case WC_CCS_VISCII_11_1:
376
1.79k
  cc.ccs = WC_CCS_VISCII_11_2;
377
1.79k
  break;
378
19.8k
    case WC_CCS_VPS_1:
379
19.8k
  cc.ccs = WC_CCS_VPS_2;
380
19.8k
  break;
381
41.9k
    }
382
41.9k
  }
383
1.48M
  cc.code = c & 0xff;
384
1.48M
  return cc;
385
1.48M
}
386
387
static wc_wchar_t
388
ucs_cp1258_conv(wc_ccs ccs, wc_uint16 c)
389
3.93M
{
390
3.93M
  wc_wchar_t cc;
391
392
3.93M
  cc.ccs = (c < 0x100) ? WC_CCS_CP1258_1 : WC_CCS_CP1258_2;
393
3.93M
  cc.code = c;
394
3.93M
  return cc;
395
3.93M
}
396
397
static wc_wchar_t
398
ucs_cns11643_conv(wc_ccs cs, wc_uint16 c)
399
10.6M
{
400
10.6M
  wc_wchar_t cc;
401
402
10.6M
  cc.ccs = (c & 0x8000) ? WC_CCS_CNS_11643_2 : WC_CCS_CNS_11643_1;
403
10.6M
  cc.code = c & 0x7f7f;
404
10.6M
  return cc;
405
10.6M
}
406
407
static wc_wchar_t
408
ucs_big5_conv(wc_ccs cs, wc_uint16 c)
409
4.97M
{
410
4.97M
  wc_wchar_t cc;
411
412
4.97M
  cc.ccs = cs;
413
4.97M
  cc.code = c;
414
4.97M
  return wc_big5_to_cs94w(cc);
415
4.97M
}
416
417
static wc_wchar_t
418
ucs_johab2_conv(wc_ccs cs, wc_uint16 c)
419
266
{
420
266
  wc_wchar_t cc;
421
422
266
  cc.ccs = cs;
423
266
  cc.code = c;
424
266
  return wc_johab_to_cs128w(cc);
425
266
}
426
427
static wc_wchar_t
428
ucs_johab3_conv(wc_ccs cs, wc_uint16 c)
429
181k
{
430
181k
  wc_wchar_t cc;
431
432
181k
  if ((c >= 0x2121 && c <  0x2421) ||
433
177k
      (c >  0x2453 && c <= 0x2C7E) ||
434
1.24k
      (c >= 0x4A21 && c <= 0x7D7E))
435
181k
     cc.ccs = cs;
436
0
  else
437
0
     cc.ccs = WC_CCS_UNKNOWN_W;
438
181k
  cc.code = c;
439
181k
  return cc;
440
181k
}
441
442
static wc_wchar_t
443
ucs_sjis_ext_conv(wc_ccs cs, wc_uint16 c)
444
6.07k
{
445
6.07k
  wc_wchar_t cc;
446
447
6.07k
  cc.ccs = cs;
448
6.07k
  cc.code = c;
449
6.07k
  return wc_sjis_ext_to_cs94w(cc);
450
6.07k
}
451
452
static wc_wchar_t
453
ucs_gbk_conv(wc_ccs cs, wc_uint16 c)
454
2.63M
{
455
2.63M
  wc_wchar_t cc;
456
457
2.63M
  cc.ccs = cs;
458
2.63M
  cc.code = c;
459
2.63M
  return wc_gbk_to_cs128w(cc);
460
2.63M
}
461
462
static wc_wchar_t
463
ucs_uhc_conv(wc_ccs cs, wc_uint16 c)
464
209k
{
465
209k
  wc_wchar_t cc;
466
467
209k
  cc.ccs = cs;
468
209k
  cc.code = c;
469
209k
  return wc_uhc_to_cs128w(cc);
470
209k
}
471
472
static wc_wchar_t
473
ucs_hkscs_conv(wc_ccs cs, wc_uint16 c)
474
25.5k
{
475
25.5k
  wc_wchar_t cc;
476
477
25.5k
  cc.ccs = cs;
478
25.5k
  cc.code = c;
479
25.5k
  return wc_hkscs_to_cs128w(cc);
480
25.5k
}
481
482
#define null_table { 0, 0, NULL, (void *)ucs_cs94_conv }
483
484
static wc_table ucs_cs94_table[] = {
485
  null_table,   /* 40 */
486
  null_table,   /* 41 */
487
  null_table,   /* 42 (US_ASCII) */
488
  null_table,   /* 43 */
489
  null_table,   /* 44 */
490
  null_table,   /* 45 */
491
  null_table,   /* 46 */
492
  null_table,   /* 47 */
493
  null_table,   /* 48 */
494
  { WC_CCS_JIS_X_0201K, N_ucs_jisx0201k_map, ucs_jisx0201k_map, (void *)ucs_cs94_conv },
495
  null_table,   /* 4A (JIS X 0201) */
496
  null_table,   /* 4B */
497
  null_table,   /* 4C */
498
  null_table,   /* 4D */
499
  null_table,   /* 4E */
500
  null_table,   /* 4F */
501
  null_table,   /* 50 */
502
  null_table,   /* 51 */
503
  null_table,   /* 52 */
504
  null_table,   /* 53 */
505
  null_table,   /* 54 (GB 1988) */
506
};
507
508
static wc_table ucs_cs96_table[] = {
509
  null_table,   /* 40 */
510
  { WC_CCS_ISO_8859_1,  N_ucs_iso88591_map,  ucs_iso88591_map,  (void *)ucs_cs96_conv },
511
  { WC_CCS_ISO_8859_2,  N_ucs_iso88592_map,  ucs_iso88592_map,  (void *)ucs_cs96_conv },
512
  { WC_CCS_ISO_8859_3,  N_ucs_iso88593_map,  ucs_iso88593_map,  (void *)ucs_cs96_conv },
513
  { WC_CCS_ISO_8859_4,  N_ucs_iso88594_map,  ucs_iso88594_map,  (void *)ucs_cs96_conv },
514
  null_table,   /* 45 */
515
  { WC_CCS_ISO_8859_7,  N_ucs_iso88597_map,  ucs_iso88597_map,  (void *)ucs_cs96_conv },
516
  { WC_CCS_ISO_8859_6,  N_ucs_iso88596_map,  ucs_iso88596_map,  (void *)ucs_cs96_conv },
517
  { WC_CCS_ISO_8859_8,  N_ucs_iso88598_map,  ucs_iso88598_map,  (void *)ucs_cs96_conv },
518
  null_table,   /* 49 */
519
  null_table,   /* 4A */
520
  null_table,   /* 4B */
521
  { WC_CCS_ISO_8859_5,  N_ucs_iso88595_map,  ucs_iso88595_map,  (void *)ucs_cs96_conv },
522
  { WC_CCS_ISO_8859_9,  N_ucs_iso88599_map,  ucs_iso88599_map,  (void *)ucs_cs96_conv },
523
  null_table,   /* 4E */
524
  null_table,   /* 4F */
525
  null_table,   /* 50 */
526
  null_table,   /* 51 */
527
  null_table,   /* 52 */
528
  null_table,   /* 53 */
529
  { WC_CCS_ISO_8859_11, N_ucs_iso885911_map, ucs_iso885911_map, (void *)ucs_cs96_conv },
530
  null_table,   /* 55 */
531
  { WC_CCS_ISO_8859_10, N_ucs_iso885910_map, ucs_iso885910_map, (void *)ucs_cs96_conv },
532
  null_table,   /* 57 */
533
  null_table,   /* 58 */
534
  { WC_CCS_ISO_8859_13, N_ucs_iso885913_map, ucs_iso885913_map, (void *)ucs_cs96_conv },
535
  null_table,   /* 5A */
536
  null_table,   /* 5B */
537
  null_table,   /* 5C */
538
  null_table,   /* 5D */
539
  null_table,   /* 5E */
540
  { WC_CCS_ISO_8859_14, N_ucs_iso885914_map, ucs_iso885914_map, (void *)ucs_cs96_conv },
541
  null_table,   /* 60 */
542
  null_table,   /* 61 */
543
  { WC_CCS_ISO_8859_15, N_ucs_iso885915_map, ucs_iso885915_map, (void *)ucs_cs96_conv },
544
  null_table,   /* 63 */
545
  null_table,   /* 64 */
546
  null_table,   /* 65 */
547
  { WC_CCS_ISO_8859_16, N_ucs_iso885916_map, ucs_iso885916_map, (void *)ucs_cs96_conv },
548
};
549
550
static wc_table *ucs_cs942_table;
551
552
static wc_table ucs_pcs_table[] = {
553
  { WC_CCS_CP437,  N_ucs_cp437_map,  ucs_cp437_map,  (void *)ucs_cs96_conv },
554
  { WC_CCS_CP737,  N_ucs_cp737_map,  ucs_cp737_map,  (void *)ucs_cs96_conv },
555
  { WC_CCS_CP775,  N_ucs_cp775_map,  ucs_cp775_map,  (void *)ucs_cs96_conv },
556
  { WC_CCS_CP850,  N_ucs_cp850_map,  ucs_cp850_map,  (void *)ucs_cs96_conv },
557
  { WC_CCS_CP852,  N_ucs_cp852_map,  ucs_cp852_map,  (void *)ucs_cs96_conv },
558
  { WC_CCS_CP855,  N_ucs_cp855_map,  ucs_cp855_map,  (void *)ucs_cs96_conv },
559
  { WC_CCS_CP856,  N_ucs_cp856_map,  ucs_cp856_map,  (void *)ucs_cs96_conv },
560
  { WC_CCS_CP857,  N_ucs_cp857_map,  ucs_cp857_map,  (void *)ucs_cs96_conv },
561
  { WC_CCS_CP860,  N_ucs_cp860_map,  ucs_cp860_map,  (void *)ucs_cs96_conv },
562
  { WC_CCS_CP861,  N_ucs_cp861_map,  ucs_cp861_map,  (void *)ucs_cs96_conv },
563
  { WC_CCS_CP862,  N_ucs_cp862_map,  ucs_cp862_map,  (void *)ucs_cs96_conv },
564
  { WC_CCS_CP863,  N_ucs_cp863_map,  ucs_cp863_map,  (void *)ucs_cs96_conv },
565
  { WC_CCS_CP864,  N_ucs_cp864_map,  ucs_cp864_map,  (void *)ucs_cs96_conv },
566
  { WC_CCS_CP865,  N_ucs_cp865_map,  ucs_cp865_map,  (void *)ucs_cs96_conv },
567
  { WC_CCS_CP866,  N_ucs_cp866_map,  ucs_cp866_map,  (void *)ucs_cs96_conv },
568
  { WC_CCS_CP869,  N_ucs_cp869_map,  ucs_cp869_map,  (void *)ucs_cs96_conv },
569
  { WC_CCS_CP874,  N_ucs_cp874_map,  ucs_cp874_map,  (void *)ucs_cs96_conv },
570
  { WC_CCS_CP1006, N_ucs_cp1006_map, ucs_cp1006_map, (void *)ucs_cs96_conv },
571
  { WC_CCS_CP1250, N_ucs_cp1250_map, ucs_cp1250_map, (void *)ucs_cs96_conv },
572
  { WC_CCS_CP1251, N_ucs_cp1251_map, ucs_cp1251_map, (void *)ucs_cs96_conv },
573
  { WC_CCS_CP1252, N_ucs_cp1252_map, ucs_cp1252_map, (void *)ucs_cs96_conv },
574
  { WC_CCS_CP1253, N_ucs_cp1253_map, ucs_cp1253_map, (void *)ucs_cs96_conv },
575
  { WC_CCS_CP1254, N_ucs_cp1254_map, ucs_cp1254_map, (void *)ucs_cs96_conv },
576
  { WC_CCS_CP1255, N_ucs_cp1255_map, ucs_cp1255_map, (void *)ucs_cs96_conv },
577
  { WC_CCS_CP1256, N_ucs_cp1256_map, ucs_cp1256_map, (void *)ucs_cs96_conv },
578
  { WC_CCS_CP1257, N_ucs_cp1257_map, ucs_cp1257_map, (void *)ucs_cs96_conv },
579
  { WC_CCS_CP1258_1, N_ucs_cp1258_map, ucs_cp1258_map, (void *)ucs_cp1258_conv },
580
  { WC_CCS_CP1258_2, N_ucs_cp1258_map, ucs_cp1258_map, (void *)ucs_cp1258_conv },
581
  { WC_CCS_TCVN_5712_1, N_ucs_tcvn5712_map, ucs_tcvn5712_map, (void *)ucs_viet_conv },
582
  { WC_CCS_TCVN_5712_2, N_ucs_tcvn5712_map, ucs_tcvn5712_map, (void *)ucs_viet_conv },
583
  { WC_CCS_TCVN_5712_3, N_ucs_tcvn5712_map, ucs_tcvn5712_map, (void *)ucs_viet_conv },
584
  { WC_CCS_VISCII_11_1, N_ucs_viscii11_map, ucs_viscii11_map, (void *)ucs_viet_conv },
585
  { WC_CCS_VISCII_11_2, N_ucs_viscii11_map, ucs_viscii11_map, (void *)ucs_viet_conv },
586
  { WC_CCS_VPS_1,  N_ucs_vps_map,    ucs_vps_map,    (void *)ucs_viet_conv },
587
  { WC_CCS_VPS_2,  N_ucs_vps_map,    ucs_vps_map,    (void *)ucs_viet_conv },
588
  { WC_CCS_KOI8_R, N_ucs_koi8r_map,  ucs_koi8r_map, (void *)ucs_cs96_conv },
589
  { WC_CCS_KOI8_U, N_ucs_koi8u_map,  ucs_koi8u_map, (void *)ucs_cs96_conv },
590
  { WC_CCS_NEXTSTEP, N_ucs_nextstep_map, ucs_nextstep_map, (void *)ucs_cs96_conv },
591
  { WC_CCS_GBK_80, N_ucs_gbk_80_map, ucs_gbk_80_map, (void *)ucs_cs96_conv },
592
  null_table,   /* (Raw) */
593
};
594
595
static wc_table ucs_cs94w_table[] = {
596
  null_table,   /* 40 (JIS C 6226) */
597
  { WC_CCS_GB_2312, N_ucs_gb2312_map, ucs_gb2312_map, (void *)ucs_cs94w_conv },
598
  { WC_CCS_JIS_X_0208, N_ucs_jisx0208_map, ucs_jisx0208_map, (void *)ucs_cs94w_conv },
599
  { WC_CCS_KS_X_1001, N_ucs_ksx1001_map, ucs_ksx1001_map, (void *)ucs_cs94w_conv },
600
  { WC_CCS_JIS_X_0212, N_ucs_jisx0212_map, ucs_jisx0212_map, (void *)ucs_cs94w_conv },
601
  null_table,   /* 45 (ISO IR 165) */
602
  null_table,   /* 46 */
603
  { WC_CCS_CNS_11643_1, N_ucs_cns11643_map, ucs_cns11643_map, (void *)ucs_cns11643_conv },
604
  { WC_CCS_CNS_11643_2, N_ucs_cns11643_map, ucs_cns11643_map, (void *)ucs_cns11643_conv },
605
  null_table,   /* 49 (CNS 11643-3) */
606
  null_table,   /* 4A (CNS 11643-4) */
607
  null_table,   /* 4B (CNS 11643-5) */
608
  null_table,   /* 4C (CNS 11643-6) */
609
  null_table,   /* 4D (CNS 11643-7) */
610
  null_table,   /* 4E (KSP 9566) */
611
  { WC_CCS_JIS_X_0213_1, N_ucs_jisx02131_map, ucs_jisx02131_map, (void *)ucs_cs94w_conv },
612
  { WC_CCS_JIS_X_0213_2, N_ucs_jisx02132_map, ucs_jisx02132_map, (void *)ucs_cs94w_conv },
613
};
614
615
static wc_table *ucs_cs96w_table;
616
617
static wc_table ucs_pcsw_table[] = {
618
  { WC_CCS_BIG5,   N_ucs_big5_map, ucs_big5_map, (void *)ucs_cs94w_conv },
619
  { WC_CCS_BIG5_1, N_ucs_big5_map, ucs_big5_map, (void *)ucs_big5_conv },
620
  { WC_CCS_BIG5_2, N_ucs_big5_map, ucs_big5_map, (void *)ucs_big5_conv },
621
  null_table,   /* CNS 11643-8 */
622
  null_table,   /* CNS 11643-9 */
623
  null_table,   /* CNS 11643-10 */
624
  null_table,   /* CNS 11643-11 */
625
  null_table,   /* CNS 11643-12 */
626
  null_table,   /* CNS 11643-13 */
627
  null_table,   /* CNS 11643-14 */
628
  null_table,   /* CNS 11643-15 */
629
  null_table,   /* CNS 11643-16 */
630
  null_table,   /* CNS 11643-X */
631
  /* use GB 12345 instead of GB 2312 */ 
632
  { WC_CCS_GB_2312, N_ucs_gb12345_map, ucs_gb12345_map, (void *)ucs_cs94w_conv },
633
  null_table,   /* Johab (special conversion) */
634
  null_table,   /* Johab-1 (special conversion) */
635
  { WC_CCS_JOHAB_2, N_ucs_johab2_map, ucs_johab2_map, (void *)ucs_johab2_conv },
636
  { WC_CCS_JOHAB_3, N_ucs_ksx1001_map, ucs_ksx1001_map, (void *)ucs_johab3_conv },
637
  { WC_CCS_SJIS_EXT,   N_ucs_sjis_ext_map, ucs_sjis_ext_map, (void *)ucs_cs94w_conv },
638
  { WC_CCS_SJIS_EXT_1, N_ucs_sjis_ext_map, ucs_sjis_ext_map, (void *)ucs_sjis_ext_conv },
639
  { WC_CCS_SJIS_EXT_2, N_ucs_sjis_ext_map, ucs_sjis_ext_map, (void *)ucs_sjis_ext_conv },
640
  { WC_CCS_GBK,   N_ucs_gbk_map, ucs_gbk_map, (void *)ucs_cs128w_conv },
641
  { WC_CCS_GBK_1, N_ucs_gbk_map, ucs_gbk_map, (void *)ucs_gbk_conv },
642
  { WC_CCS_GBK_2, N_ucs_gbk_map, ucs_gbk_map, (void *)ucs_gbk_conv },
643
  null_table,   /* GB18030 GBK-ext (special conversion) */
644
  null_table,   /* GB18030 GBK-ext-1 (special conversion) */
645
  null_table,   /* GB18030 GBK-ext-2 (special conversion) */
646
  { WC_CCS_UHC,   N_ucs_uhc_map, ucs_uhc_map, (void *)ucs_cs128w_conv },
647
  { WC_CCS_UHC_1, N_ucs_uhc_map, ucs_uhc_map, (void *)ucs_uhc_conv },
648
  { WC_CCS_UHC_2, N_ucs_uhc_map, ucs_uhc_map, (void *)ucs_uhc_conv },
649
  { WC_CCS_HKSCS,   N_ucs_hkscs_map, ucs_hkscs_map, (void *)ucs_cs128w_conv },
650
  { WC_CCS_HKSCS_1, N_ucs_hkscs_map, ucs_hkscs_map, (void *)ucs_hkscs_conv },
651
  { WC_CCS_HKSCS_2, N_ucs_hkscs_map, ucs_hkscs_map, (void *)ucs_hkscs_conv },
652
};
653