summaryrefslogtreecommitdiff
path: root/support/charconv/charstab.h
blob: aba7a31aa25297bdc245e8d2364bb7b4c78882ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
/* charstab
 * @(#)Character tables. 1993/07/13 BKi
 */

/* Character table of Atari ST */
char *st_table[] = {
  "\\000","\\001","\\002","\\003","\\004","\\005","\\006","\\007",
  "\\010","\\011","\\012","\\013","\\014","\\015","\\016","\\017",
  "\\020","\\021","\\022","\\023","\\024","\\025","\\026","\\027",
  "\\030","\\031","\\032","\\033","\\034","\\035","\\036","\\037",
  " ","!","\"","#","$","%","&","'",
  "(",")","*","+",",","-",".","/",
  "0","1","2","3","4","5","6","7",
  "8","9",":",";","<","=",">","?",
  "@","A","B","C","D","E","F","G",
  "H","I","J","K","L","M","N","O",
  "P","Q","R","S","T","U","V","W",
  "X","Y","Z","[","\\{}","]","^","_",
  "`","a","b","c","d","e","f","g",
  "h","i","j","k","l","m","n","o",
  "p","q","r","s","t","u","v","w",
  "x","y","z","{","|","}","~","\\177",
  "\\c{C}","\\\"u","\\'e","\\^a","\\\"a","\\`a","\\aa{}","\\c{c}",
  "\\^e","\\\"e","\\`e","\\\"i","\\^i","\\`i","\\\"A","\\AA{}",
  "\\'E","\\ae{}","\\AE{}","\\^o","\\\"o","\\`o","\\^u","\\`u",
  "\\\"y","\\\"O","\\\"U","\\cents{}","\\pound{}","\\yen{}","\\ss{}",
  "\\florin{}",
  "\\'a","\\'i","\\'o","\\'u","\\~n","\\~N","\\b{a}","\\b{o}",
  "\\?`","\\251","\\neg{}","\\onehalf{}","\\onequarter{}","\\!`","\\ll{}",
  "\\gg{}",
  "\\~a","\\~o","\\O{}","\\o{}","\\oe{}","\\OE{}","\\`A","\\~A",
  "\\~O","\\\"_","\\'_","\\dagger{}","\\P{}","\\copyright{}",
  "\\registered{}","\\trademark{}",
  "\\300","\\301","\\302","\\303","\\304","\\305","\\306","\\307",
  "\\310","\\311","\\312","\\313","\\314","\\315","\\316","\\317",
  "\\320","\\321","\\322","\\323","\\324","\\325","\\326","\\327",
  "\\330","\\331","\\332","\\333","\\334","\\S{}","\\336","\\infty{}",
  "\\alpha{}","\\beta{}","\\Gamma{}","\\pi{}","\\Sigma{}","\\sigma{}","\\mu{}",
  "\\tau{}",
  "\\Phi{}","\\Theta{}","\\Omega{}","\\delta{}","\\354","\\phi{}",
  "\\epsilon{}","\\cap{}",
  "\\equiv{}","\\pm{}","\\ge{}","\\le{}","\\uint{}","\\lint{}","\\div{}",
  "\\approx{}",
  "\\degree{}","\\bullet{}","\\cdot{}","\\sqrt{}","\\nsuperior{}",
  "\\twosuperior{}","\\threesuperior{}","\\377"};

/* 256 entries */

/* Character table of IBM PC DOS, international code page 437 */
char *pc_table[] = {
  "\\000","\\001","\\002","\\003","\\004","\\005","\\006","\\007",
  "\\010","\\011","\\012","\\013","\\014","\\015","\\016","\\017",
  "\\020","\\021","\\022","\\023","\\P{}","\\S{}","\\026","\\027",
  "\\030","\\031","\\032","\\033","\\034","\\035","\\036","\\037",
  " ","!","\"","#","$","%","&","'",
  "(",")","*","+",",","-",".","/",
  "0","1","2","3","4","5","6","7",
  "8","9",":",";","<","=",">","?",
  "@","A","B","C","D","E","F","G",
  "H","I","J","K","L","M","N","O",
  "P","Q","R","S","T","U","V","W",
  "X","Y","Z","[","\\{}","]","^","_",
  "`","a","b","c","d","e","f","g",
  "h","i","j","k","l","m","n","o",
  "p","q","r","s","t","u","v","w",
  "x","y","z","{","|","}","~","\\177",
  "\\c{C}","\\\"u","\\'e","\\^a","\\\"a","\\`a","\\aa{}","\\c{c}",
  "\\^e","\\\"e","\\`e","\\\"i","\\^i","\\`i","\\\"A","\\AA{}",
  "\\'E","\\ae{}","\\AE{}","\\^o","\\\"o","\\`o","\\^u","\\`u",
  "\\\"y","\\\"O","\\\"U","\\cents{}","\\pound{}","\\yen{}","\\peseta{}",
  "\\florin{}",
  "\\'a","\\'i","\\'o","\\'u","\\~n","\\~N","\\b{a}","\\b{o}",
  "\\?`","\\251","\\neg{}","\\onehalf{}","\\onequarter{}","\\!`","\\ll{}",
  "\\gg{}",
  "\\260","\\261","\\262","\\263","\\264","\\265","\\266","\\267",
  "\\270","\\271","\\272","\\273","\\274","\\275","\\276","\\277",
  "\\300","\\301","\\302","\\303","\\304","\\305","\\306","\\307",
  "\\310","\\311","\\312","\\313","\\314","\\315","\\316","\\317",
  "\\320","\\321","\\322","\\323","\\324","\\325","\\326","\\327",
  "\\330","\\331","\\332","\\333","\\334","\\335","\\336","\\337",
  "\\alpha{}","\\ss{}","\\Gamma{}","\\pi{}","\\Sigma{}","\\sigma{}","\\mu{}",
  "\\tau{}",
  "\\Phi{}","\\Theta{}","\\Omega{}","\\delta{}","\\infty{}","\\phi{}",
  "\\epsilon{}","\\cap{}",
  "\\equiv{}","\\pm{}","\\ge{}","\\le{}","\\uint{}","\\lint{}","\\div{}",
  "\\approx{}",
  "\\degree{}","\\bullet{}","\\cdot{}","\\sqrt{}","\\nsuperior{}",
  "\\twosuperior{}","\\376","\\space{}"};

/* 256 entries */

/* Character table ANSI ISO latin1 (Unix) */
char *iso_table[] = {
  "\\000","\\001","\\002","\\003","\\004","\\005","\\006","\\007",
  "\\010","\\011","\\012","\\013","\\014","\\015","\\016","\\017",
  "\\020","\\021","\\022","\\023","\\024","\\025","\\026","\\027",
  "\\030","\\031","\\032","\\033","\\034","\\035","\\036","\\037",
  " ","!","\"","#","$","%","&","'",
  "(",")","*","+",",","-",".","/",
  "0","1","2","3","4","5","6","7",
  "8","9",":",";","<","=",">","?",
  "@","A","B","C","D","E","F","G",
  "H","I","J","K","L","M","N","O",
  "P","Q","R","S","T","U","V","W",
  "X","Y","Z","[","\\{}","]","^","_",
  "`","a","b","c","d","e","f","g",
  "h","i","j","k","l","m","n","o",
  "p","q","r","s","t","u","v","w",
  "x","y","z","{","|","}","~","\\177",
  "\\200","\\201","\\quotesinglbase{}","\\florin{}","\\quotedblbase{}",
  "\\ldots{}","\\dagger{}","\\ddagger{}",
  "\\^_","\\perthousand{}","\\v{S}","\\guilsinglleft{}","\\OE{}","\\215",
  "\\216","\\217",
  "\\220","\\quoteleft{}","\\quoteright{}","\\quotedblleft{}",
  "\\quotedblright{}","\\bullet{}","\\endash{}","\\emdash{}",
  "\\~_","\\trademark{}","\\v{s}","\\guilsinglright{}","\\oe{}","\\235",
  "\\236","\\\"Y",
  "\\space{}","\\!`","\\cents{}","\\pound{}","\\currency{}","\\yen{}",
  "\\brokenbar{}","\\S{}",
  "\\\"_","\\copyright{}","\\b{a}","\\ll{}","\\neg{}","\\hyphen{}",
  "\\registered{}","\\=_",
  "\\degree{}","\\pm{}","\\twosuperior{}","\\threesuperior{}","\\'_",
  "\\mu{}","\\P{}","\\cdot{}",
  "\\c{_}","\\onesuperior{}","\\b{o}","\\gg{}","\\onequarter{}","\\onehalf{}",
  "\\threequarters{}","\\?`",
  "\\`A","\\'A","\\^A","\\~A","\\\"A","\\AA{}","\\AE{}","\\c{C}",
  "\\`E","\\'E","\\^E","\\\"E","\\`I","\\'I","\\^I","\\\"I",
  "\\Eth{}","\\~N","\\`O","\\'O","\\^O","\\~O","\\\"O","\\times{}",
  "\\O{}","\\`U","\\'U","\\^U","\\\"U","\\'Y","\\Thorn{}","\\ss{}",
  "\\`a","\\'a","\\^a","\\~a","\\\"a","\\aa{}","\\ae{}","\\c{c}",
  "\\`e","\\'e","\\^e","\\\"e","\\`i","\\'i","\\^i","\\\"i",
  "\\eth{}","\\~n","\\`o","\\'o","\\^o","\\~o","\\\"o","\\div{}",
  "\\o{}","\\`u","\\'u","\\^u","\\\"u","\\'y","\\thorn{}","\\\"y"};

/* 256 entries */

/* character table of Apple Macintosh */
char *mac_table[] = {
  "\\000","\\001","\\002","\\003","\\004","\\005","\\006","\\007",
  "\\010","\\011","\\012","\\013","\\014","\\015","\\016","\\017",
  "\\020","\\021","\\022","\\023","\\024","\\025","\\026","\\027",
  "\\030","\\031","\\032","\\033","\\034","\\035","\\036","\\037",
  " ","!","\"","#","$","%","&","'",
  "(",")","*","+",",","-",".","/",
  "0","1","2","3","4","5","6","7",
  "8","9",":",";","<","=",">","?",
  "@","A","B","C","D","E","F","G",
  "H","I","J","K","L","M","N","O",
  "P","Q","R","S","T","U","V","W",
  "X","Y","Z","[","\\{}","]","^","_",
  "`","a","b","c","d","e","f","g",
  "h","i","j","k","l","m","n","o",
  "p","q","r","s","t","u","v","w",
  "x","y","z","{","|","}","~","\\177",
  "\\\"A","\\AA{}","\\c{C}","\\'E","\\~N","\\\"O","\\\"U","\\'a",
  "\\`a","\\^a","\\\"a","\\~a","\\aa{}","\\c{c}","\\'e","\\`e",
  "\\^e","\\\"e","\\'i","\\`i","\\^i","\\\"i","\\~n","\\'o",
  "\\`o","\\^o","\\\"o","\\~o","\\'u","\\`u","\\^u","\\\"u",
  "\\dagger{}","\\degree{}","\\cents{}","\\pound{}","\\S{}","\\bullet{}",
  "\\P{}","\\ss{}",
  "\\registered{}","\\copyright{}","\\trademark{}","\\'_","\\\"_",
  "\\ne{}","\\AE{}","\\O{}",
  "\\infty{}","\\pm{}","\\le{}","\\ge{}","\\yen{}","\\mu{}","\\partial{}",
  "\\Sigma{}",
  "\\Pi{}","\\Pi{}","\\int{}","\\b{a}","\\b{o}","\\Omega{}","\\ae{}","\\o{}",
  "\\?`","\\!`","\\neg{}","\\sqrt{}","\\florin{}","\\approx{}","\\Delta{}",
  "\\ll{}",
  "\\gg{}","\\ldots{}","\\space{}","\\`A","\\~A","\\~O","\\OE{}","\\oe{}",
  "\\endash{}","\\emdash{}","\\quotedblleft{}","\\quotedblright{}",
  "\\quoteleft{}","\\quoteright{}","\\div{}","\\diamond{}",
  "\\\"y","\\\"Y","/","\\333","\\guilsinglleft{}","\\guilsinglright{}",
  "\\fi{}","\\fl{}",
  "\\ddagger{}","\\cdot{}","\\quotesinglbase{}","\"","\\perthousand{}",
  "\\^A","\\^E","\\'A",
  "\\\"E","\\`E","\\'I","\\^I","\\\"I","\\`I","\\'O","\\^O",
  "\\360","\\`O","\\'U","\\^U","\\`U","\\oldstyleone{}","\\^_","\\~_",
  "\\=_","\\u{_}","\\._","\\373","\\c{_}","\\H{_}","\\376","\\v{_}"};

/* 256 entries */

/* Symbol character table */
char *sym_table[] = {
  "\\000","\\001","\\002","\\003","\\004","\\005","\\006","\\007",
  "\\010","\\011","\\012","\\013","\\014","\\015","\\016","\\017",
  "\\020","\\021","\\022","\\023","\\024","\\025","\\026","\\027",
  "\\030","\\031","\\032","\\033","\\034","\\035","\\036","\\037",
  " ","!","\\forall{}","#","\\exists{}","%","&","\\ni{}",
  "(",")","\\ast{}","+",",","-",".","/",
  "0","1","2","3","4","5","6","7",
  "8","9",":",";","<","=",">","?",
  "\\cong{}","A","B","X","\\Delta{}","E","\\Phi{}","\\Gamma{}",
  "H","I","\\vartheta{}","K","\\Lambda{}","M","N","O",
  "\\Pi{}","\\Theta{}","P","\\Sigma{}","T","Y","\\varsigma{}","\\Omega{}",
  "\\Xi{}","\\Psi{}","Z","[","\\therefore{}","]","\\perp{}","_",
  "\\dashsuperior{}","\\alpha{}","\\beta{}","\\chi{}","\\delta{}",
  "\\varepsilon{}","\\phi{}","\\gamma{}",
  "\\eta{}","\\iota{}","\\varphi{}","\\kappa{}","\\lambda{}","\\mu{}","\\nu{}",
  "o",
  "\\pi{}","\\theta{}","\\rho{}","\\sigma{}","\\tau{}","\\upsilon{}",
  "\\varpi{}","\\omega{}",
  "\\xi{}","\\psi{}","\\zeta{}","{","|","}","\\sim{}","\\177",
  "\\200","\\201","\\202","\\203","\\204","\\205","\\206","\\207",
  "\\210","\\211","\\212","\\213","\\214","\\215","\\216","\\217",
  "\\220","\\221","\\222","\\223","\\224","\\225","\\226","\\227",
  "\\230","\\231","\\232","\\233","\\234","\\235","\\236","\\237",
  "\\240","\\Upsilon{}","'","\\le{}","/","\\infty{}","\\florin{}",
  "\\clubsuit{}",
  "\\diamondsuit{}","\\heartsuit{}","\\spadesuit{}","\\leftrightarrow{}",
  "\\leftarrow{}","\\uparrow{}","\\rightarrow{}","\\downarrow{}",
  "\\degree{}","\\pm{}","\"","\\ge{}","\\times{}","\\propto{}","\\partial{}",
  "\\bullet{}",
  "\\div{}","\\ne{}","\\equiv{}","\\approx{}","\\dots{}","|","\\endash{}",
  "\\hookleftarrow{}",
  "\\aleph{}","\\Im{}","\\Re{}","\\wp{}","\\otimes{}","\\oplus{}",
  "\\emptyset{}","\\cap{}",
  "\\cup{}","\\supset{}","\\supseteq{}","\\notsubset{}","\\subset{}",
  "\\subseteq{}","\\in{}","\\notin{}",
  "\\angle{}","\\nabla{}","\\registered{}","\\copyright{}","\\trademark{}",
  "\\prod{}","\\sqrt{}","\\cdot{}",
  "\\neg{}","\\wedge{}","\\vee{}","\\Leftrightarrow{}","\\Leftarrow{}",
  "\\Uparrow{}","\\Rightarrow{}","\\Downarrow{}",
  "\\diamond{}","\\langle{}","\\registered{}","\\copyright{}","\\trademark{}",
  "\\sum{}","\\346","\\347",
  "\\350","\\351","\\352","\\353","\\354","\\355","\\356","\\357",
  "\\360","\\rangle{}","\\int{}","\\363","\\364","\\365","\\366","\\367",
  "\\370","\\371","\\372","\\373","\\374","\\375","\\376","\\cong{}"};

/* 256 entries */

/* string conversion:
 * transcript, TeX, HTML, plain-ASCII  *** TODO ***
 */
#define TRANS_ROW 318  /* number of entries (lines) */
#define TRANS_COL 4   /* number of types (columns) */
char *trans_string[TRANS_ROW][TRANS_COL] = {
  {" "," "," "," "},
  {"!","!","!","!"},
  {"\"","''","\"","\""},
  {"#","\\#","#","#"},
  {"$","\\$","$","$"},
  {"%","\\%","%","%"},
  {"&","\\&","&amp;","&"},
  {"'","'","'","'"},
  {"(","(","(","("},
  {")",")",")",")"},
  {"*","*","*","*"},
  {"+","+","+","+"},
  {",",",",",",","},
  {"-","-","-","-"},
  {".",".",".","."},
  {"/","/","/","/"},
  {"0","0","0","0"},
  {"1","1","1","1"},
  {"2","2","2","2"},
  {"3","3","3","3"},
  {"4","4","4","4"},
  {"5","5","5","5"},
  {"6","6","6","6"},
  {"7","7","7","7"},
  {"8","8","8","8"},
  {"9","9","9","9"},
  {":",":",":",":"},
  {";",";",";",";"},
  {"<","$<$","&lt;","<"},
  {"=","=","=","="},
  {">","$>$","&gt;",">"},
  {"?","?","?","?"},
  {"@","@","@","@"},
  {"A","A","A","A"},
  {"B","B","B","B"},
  {"C","C","C","C"},
  {"D","D","D","D"},
  {"E","E","E","E"},
  {"F","F","F","F"},
  {"G","G","G","G"},
  {"H","H","H","H"},
  {"I","I","I","I"},
  {"J","J","J","J"},
  {"K","K","K","K"},
  {"L","L","L","L"},
  {"M","M","M","M"},
  {"N","N","N","N"},
  {"O","O","O","O"},
  {"P","P","P","P"},
  {"Q","Q","Q","Q"},
  {"R","R","R","R"},
  {"S","S","S","S"},
  {"T","T","T","T"},
  {"U","U","U","U"},
  {"V","V","V","V"},
  {"W","W","W","W"},
  {"X","X","X","X"},
  {"Y","Y","Y","Y"},
  {"Z","Z","Z","Z"},
  {"[","[","[","["},
  {"\\{}","$\\backslash$","\\","\\"},
  {"]","]","]","]"},
  {"^","\\^{ }","^","^"},
  {"_","\\_","_","_"},
  {"`","`","`","`"},
  {"a","a","a","a"},
  {"b","b","b","b"},
  {"c","c","c","c"},
  {"d","d","d","d"},
  {"e","e","e","e"},
  {"f","f","f","f"},
  {"g","g","g","g"},
  {"h","h","h","h"},
  {"i","i","i","i"},
  {"j","j","j","j"},
  {"k","k","k","k"},
  {"l","l","l","l"},
  {"m","m","m","m"},
  {"n","n","n","n"},
  {"o","o","o","o"},
  {"p","p","p","p"},
  {"q","q","q","q"},
  {"r","r","r","r"},
  {"s","s","s","s"},
  {"t","t","t","t"},
  {"u","u","u","u"},
  {"v","v","v","v"},
  {"w","w","w","w"},
  {"x","x","x","x"},
  {"y","y","y","y"},
  {"z","z","z","z"},
  {"{","$\\{$","{","{"},
  {"|","$|$","|","|"},
  {"}","$\\}$","}","}"},
  {"~","\\~{ }","~","~"},
  {"\\quotesinglbase{}",",",",",","},
  {"\\quotedblbase{}",",,","\"","\""},
  {"\\quoteleft{}","`","`","`"},
  {"\\quoteright{}","'","'","'"},
  {"\\quotedblleft{}","``","\"","\""},
  {"\\quotedblright{}","''","\"","\""},
  {"\\guilsinglleft{}","$<$","&lt;","<"},
  {"\\guilsinglright{}","$>$","&gt;",">"},
  {"\\bullet{}","$\\bullet$","*","*"},
  {"\\endash{}","{}--{}","-","-"},
  {"\\emdash{}","{}---{}","-","-"},
  {"\\ldots{}","$\\ldots$","...","..."},
  {"\\dagger{}","$\\dagger$","+","+"},
  {"\\ddagger{}","$\\ddagger$","#","#"},
  {"\\perthousand{}","$^o/_{oo}$","o/oo","o/oo"},
  {"\\florin{}","$f$","f","f"},
  {"\\trademark{}","$^{TM}$","(TM)","(TM)"},
  {"\\copyright{}","\\copyright{}","(C)","(C)"},
  {"\\registered{}","(R)","(R)","(R)"},
  {"\\cents{}"," cents ","cents","cents"},
  {"\\pound{}","{\\it\\$}","pound","pound"},
  {"\\currency{}"," currency ","(currency)","<currency>"},
  {"\\yen{}"," yen ","yen","yen"},
  {"\\brokenbar{}","$|$","|","|"},
  {"\\b{a}","\\b{a}","na.","na."},
  {"\\b{o}","\\b{o}","no.","no."},
  {"\\ll{}","$\\ll$","&lt;&lt;","<<"},
  {"\\gg{}","$\\gg$","&gt;&gt;",">>"},
  {"\\neg{}","$\\neg$","(neg)","<neg>"},
  {"\\hyphen{}","{}---{}","-","-"},
  {"\\degree{}","$^\\circ$","^o","^o"},
  {"\\pm{}","$\\pm$","+-","+-"},
  {"\\times{}","$\\times$","x","x"},
  {"\\div{}","$\\div$","/","/"},
  {"\\cdot{}","$\\cdot$","*","*"},
  {"\\P{}","\\P{}","(par)","<par>"},
  {"\\S{}","\\S{}","(sect)","<sect>"},
  {"\\Eth{}","Eth","&ETH;","Eth"},
  {"\\Thorn{}","Thorn","&THORN;","Thorn"},
  {"\\eth{}","eth","&eth;","eth"},
  {"\\thorn{}","thorn","&thorn;","thorn"},
  {"\\onequarter{}","$^1/_4$","1/4","1/4"},
  {"\\onehalf{}","$^1/_2$","1/2","1/2"},
  {"\\threequarters{}","$^3/_4$","3/4","3/4"},
  {"\\onesuperior{}","$^1$","^1","^1"},
  {"\\twosuperior{}","$^2$","^2","^2"},
  {"\\threesuperior{}","$^3$","^3","^3"},
  {"\\space{}","\\space{}"," "," "},
  {"\\cong{}","$\\cong$","(cong)","<cong>"},
  {"\\therefore{}","$.\\!\\cdot\\!.$","(therefore)","<therefore>"},
  {"\\perp{}","$\\perp$","(perp)","<perp>"},
  {"\\dashsuperior{}","$^-$","^-","^-"},
  {"\\forall{}","$\\forall$","(forall)","<forall>"},
  {"\\exists{}","$\\exists$","(exists)","<exists>"},
  {"\\ni{}","$\\ni$","(ni)","<ni>"},
  {"\\ast{}","$\\ast$","*","*"},
  {"\\sim{}","$\\sim$","~","~"},
  {"\\le{}","$\\le$","&lt;=","<="},
  {"\\ge{}","$\\ge$","&gt;=",">="},
  {"\\infty{}","$\\infty$","(infty)","<infty>"},
  {"\\clubsuit{}","$\\clubsuit$","(clubsuit)","<clubsuit>"},
  {"\\diamondsuit{}","$\\diamondsuit$","(diamondsuit)","<diamondsuit>"},
  {"\\heartsuit{}","$\\heartsuit$","(heartsuit)","<heartsuit>"},
  {"\\spadesuit{}","$\\spadesuit$","(spadesuit)","<spadesuit>"},
  {"\\leftrightarrow{}","$\\leftrightarrow$","$lt;-$gt;","<->"},
  {"\\leftarrow{}","$\\leftarrow$","$lt;-","<-"},
  {"\\uparrow{}","$\\uparrow$","^","^"},
  {"\\rightarrow{}","$\\rightarrow$","-$gt;","->"},
  {"\\downarrow{}","$\\downarrow$","v","v"},
  {"\\propto{}","$\\propto$","(propto)","<propto>"},
  {"\\partial{}","$\\partial$","(partial)","<partial>"},
  {"\\ne{}","$\\ne$","=/=","=/="},
  {"\\equiv{}","$\\equiv$","(equiv)","<equiv>"},
  {"\\approx{}","$\\approx$","(approx)","<approx>"},
  {"\\dots{}","$\\dots$","(dots)","<dots>"},
  {"\\hookleftarrow{}","$\\hookleftarrow$","&lt;-'","<-'"},
  {"\\aleph{}","$\\aleph$","(aleph)","<aleph>"},
  {"\\Im{}","$\\Im$","(Im)","<Im>"},
  {"\\Re{}","$\\Re$","(Re)","<Re>"},
  {"\\wp{}","$\\wp$","p","p"},
  {"\\otimes{}","$\\otimes$","x","x"},
  {"\\oplus{}","$\\oplus$","+","+"},
  {"\\emptyset{}","$\\emptyset$","(emptyset)","<emptyset>"},
  {"\\cap{}","$\\cap$","(cap)","<cap>"},
  {"\\cup{}","$\\cup$","(cup)","<cup>"},
  {"\\supset{}","$\\supset$","(supset)","<supset>"},
  {"\\supseteq{}","$\\supseteq$","(supseteq)","<supseteq>"},
  {"\\notsubset{}","$\\not\\subset$","(notsubset)","<notsubset>"},
  {"\\subset{}","$\\subset$","(subset)","<subset>"},
  {"\\subseteq{}","$\\subseteq$","(subseteq)","<subseteq>"},
  {"\\in{}","$\\in$","(in)","<in>"},
  {"\\notin{}","$\\not\\in$","(notin)","<notin>"},
  {"\\angle{}","$\\angle$","(angle)","<angle>"},
  {"\\nabla{}","$\\nabla$","(nabla)","<nabla>"},
  {"\\prod{}","$\\prod$","(prod)","<prod>"},
  {"\\sqrt{}","$\\sqrt{}$","(sqrt)","<sqrt>"},
  {"\\wedge{}","$\\wedge$","^","^"},
  {"\\vee{}","$\\vee$","v","v"},
  {"\\Leftrightarrow{}","$\\Leftrightarrow$","&lt;=&gt;","<=>"},
  {"\\Leftarrow{}","$\\Leftarrow$","&lt;=","<="},
  {"\\Uparrow{}","$\\Uparrow$","^","^"},
  {"\\Rightarrow{}","$\\Rightarrow$","=&gt;","=>"},
  {"\\Downarrow{}","$\\Downarrow$","v","v"},
  {"\\diamond{}","$\\diamond$","(diamond)","<diamond>"},
  {"\\langle{}","$\\langle$","&lt;","<"},
  {"\\rangle{}","$\\rangle$","&gt;",">"},
  {"\\sum{}","$\\sum$","(sum)","<sum>"},
  {"\\int{}","$\\int$","(int)","<int>"},
  {"\\oldstyleone{}","$\\oldstyle1$","1","1"},
  {"\\!`","!`","!`","!`"},
  {"\\?`","?`","?`","?`"},
  {"\\^_","\\^{ }","^","^"},
  {"\\~_","\\~{ }","~","~"},
  {"\\\"_","\\\"{ }","\"","\""},
  {"\\=_","\\={ }","=","="},
  {"\\'_","\\'{ }","'","'"},
  {"\\._","\\.{ }",".","."},
  {"\\H{_}","\\H{ }","\"","\""},
  {"\\c{_}","\\c{ }",",",","},
  {"\\u{_}","\\u{ }","u","u"},
  {"\\v{_}","\\v{ }","v","v"},
  {"\\`A","\\`A","&Agrave;","A"},
  {"\\'A","\\'A","&Aacute;","A"},
  {"\\^A","\\^A","&Acirc;","A"},
  {"\\~A","\\~A","&Atilde;","A"},
  {"\\\"A","\\\"A","&Auml;","Ae"},
  {"\\AA{}","\\AA{}","&Aring;","AA"},
  {"\\AE{}","\\AE{}","&AElig;","AE"},
  {"\\c{C}","\\c{C}","&Ccedil;","C"},
  {"\\`E","\\`E","&Egrave;","E"},
  {"\\'E","\\'E","&Eacute;","E"},
  {"\\^E","\\^E","&Ecirc;","E"},
  {"\\\"E","\\\"E","&Euml;","E"},
  {"\\`I","\\`I","&Igrave;","I"},
  {"\\'I","\\'I","&Iacute;","I"},
  {"\\^I","\\^I","&Icirc;","I"},
  {"\\\"I","\\\"I","&Iuml;","I"},
  {"\\~N","\\~N","&Ntilde;","N"},
  {"\\`O","\\`O","&Ograve;","O"},
  {"\\'O","\\'O","&Oacute;","O"},
  {"\\^O","\\^O","&Ocirc;","O"},
  {"\\~O","\\~O","&Otilde;","O"},
  {"\\\"O","\\\"O","&Ouml;","Oe"},
  {"\\O{}","\\O{}","&Oslash;","Oe"},
  {"\\OE{}","\\OE{}","OE","OE"},
  {"\\v{S}","\\v{S}","S","S"},
  {"\\`U","\\`U","&Ugrave;","U"},
  {"\\'U","\\'U","&Uacute;","U"},
  {"\\^U","\\^U","&Ucirc;","U"},
  {"\\\"U","\\\"U","&Uuml;","Ue"},
  {"\\'Y","\\'Y","&Yacute;","Y"},
  {"\\\"Y","\\\"Y","Y","Y"},
  {"\\`a","\\`a","&agrave;","a"},
  {"\\'a","\\'a","&aacute;","a"},
  {"\\^a","\\^a","&acirc;","a"},
  {"\\~a","\\~a","&atilde;","a"},
  {"\\\"a","\\\"a","&auml;","ae"},
  {"\\aa{}","\\aa{}","&aring;","aa"},
  {"\\ae{}","\\ae{}","&aelig;","ae"},
  {"\\c{c}","\\c{c}","&ccedil;","c"},
  {"\\`e","\\`e","&egrave;","e"},
  {"\\'e","\\'e","&eacute;","e"},
  {"\\^e","\\^e","&ecirc;","e"},
  {"\\\"e","\\\"e","&euml;","e"},
  {"\\`i","\\`{\\i}","&igrave;","i"},
  {"\\'i","\\'{\\i}","&iacute;","i"},
  {"\\^i","\\^{\\i}","&icirc;","i"},
  {"\\\"i","\\\"{\\i}","&iuml;","i"},
  {"\\~n","\\~n","&ntilde;","n"},
  {"\\`o","\\`o","&ograve;","o"},
  {"\\'o","\\'o","&oacute;","o"},
  {"\\^o","\\^o","&ocirc;","o"},
  {"\\~o","\\~o","&otilde;","o"},
  {"\\\"o","\\\"o","&ouml;","oe"},
  {"\\o{}","\\o{}","&oslash;","oe"},
  {"\\oe{}","\\oe{}","oe","oe"},
  {"\\ss{}","\\ss{}","&szlig;","ss"},
  {"\\v{s}","\\v{s}","s","s"},
  {"\\`u","\\`u","&ugrave;","u"},
  {"\\'u","\\'u","&uacute;","u"},
  {"\\^u","\\^u","&ucirc;","u"},
  {"\\\"u","\\\"u","&uuml;","ue"},
  {"\\'y","\\'y","&yacute;","y"},
  {"\\\"y","\\\"y","&yuml;","y"},
  {"\\Delta{}","$\\Delta$","Delta","Delta"},
  {"\\Phi{}","$\\Phi$","Phi","Phi"},
  {"\\Gamma{}","$\\Gamma$","Gamma","Gamma"},
  {"\\Lambda{}","$\\Lambda$","Lambda","Lambda"},
  {"\\Pi{}","$\\Pi$","Pi","Pi"},
  {"\\Theta{}","$\\Theta$","Theta","Theta"},
  {"\\Sigma{}","$\\Sigma$","Sigma","Sigma"},
  {"\\Omega{}","$\\Omega$","Omega","Omega"},
  {"\\Xi{}","$\\Xi$","Xi","Xi"},
  {"\\Psi{}","$\\Psi$","Psi","Psi"},
  {"\\Upsilon{}","$\\Upsilon$","Upsilon","Upsilon"},
  {"\\alpha{}","$\\alpha$","alpha","alpha"},
  {"\\beta{}","$\\beta$","beta","beta"},
  {"\\chi{}","$\\chi$","chi","chi"},
  {"\\delta{}","$\\delta$","delta","delta"},
  {"\\epsilon{}","$\\epsilon$","epsilon","epsilon"},
  {"\\varepsilon{}","$\\varepsilon$","epsilon","epsilon"},
  {"\\phi{}","$\\phi$","phi","phi"},
  {"\\varphi{}","$\\varphi$","phi","phi"},
  {"\\gamma{}","$\\gamma$","gamma","gamma"},
  {"\\eta{}","$\\eta$","eta","eta"},
  {"\\iota{}","$\\iota$","iota","iota"},
  {"\\kappa{}","$\\kappa$","kappa","kappa"},
  {"\\lambda{}","$\\lambda$","lambda","lambda"},
  {"\\mu{}","$\\mu$","mu","mu"},
  {"\\nu{}","$\\nu$","nu","nu"},
  {"\\pi{}","$\\pi$","pi","pi"},
  {"\\varpi{}","$\\varpi$","pi","pi"},
  {"\\theta{}","$\\theta$","theta","theta"},
  {"\\vartheta{}","$\\vartheta$","theta","theta"},
  {"\\rho{}","$\\rho$","rho","rho"},
  {"\\sigma{}","$\\sigma$","sigma","sigma"},
  {"\\varsigma{}","$\\varsigma$","sigma","sigma"},
  {"\\tau{}","$\\tau$","tau","tau"},
  {"\\upsilon{}","$\\upsilon$","upsilon","upsilon"},
  {"\\omega{}","$\\omega$","omega","omega"},
  {"\\xi{}","$\\xi$","xi","xi"},
  {"\\psi{}","$\\psi$","psi","psi"},
  {"\\zeta{}","$\\zeta$","zeta","zeta"}
}; /* trans_string */

/* Rich Text Format (RTF) table */
char *rtf_table[] = {
  "\\'00","\\'01","\\'02","\\'03","\\'04","\\'05","\\'06","\\'07",
  "\\'08","\\'09","\\'0a","\\'0b","\\'0c","\\'0d","\\'0e","\\'0f",
  "\\'10","\\'11","\\'12","\\'13","\\'14","\\'15","\\'16","\\'17",
  "\\'18","\\'19","\\'1a","\\'1b","\\'1c","\\'1d","\\'1e","\\'1f",
  " ","!","\"","#","$","%","&","'",
  "(",")","*","+",",","-",".","/",
  "0","1","2","3","4","5","6","7",
  "8","9",":",";","<","=",">","?",
  "@","A","B","C","D","E","F","G",
  "H","I","J","K","L","M","N","O",
  "P","Q","R","S","T","U","V","W",
  "X","Y","Z","[","\\\\","]","^","_",
  "`","a","b","c","d","e","f","g",
  "h","i","j","k","l","m","n","o",
  "p","q","r","s","t","u","v","w",
  "x","y","z","{","|","}","~","\\'7f",
  "\\'80","\\'81","\\'82","\\'83","\\'84","\\'85","\\'86","\\'87",
  "\\'88","\\'89","\\'8a","\\'8b","\\'8c","\\'8d","\\'8e","\\'8f",
  "\\'90","\\'91","\\'92","\\'93","\\'94","\\'95","\\'96","\\'97",
  "\\'98","\\'99","\\'9a","\\'9b","\\'9c","\\'9d","\\'9e","\\'9f",
  "\\'a0","\\'a1","\\'a2","\\'a3","\\'a4","\\'a5","\\'a6","\\'a7",
  "\\'a8","\\'a9","\\'aa","\\'ab","\\'ac","\\'ad","\\'ae","\\'af",
  "\\'b0","\\'b1","\\'b2","\\'b3","\\'b4","\\'b5","\\'b6","\\'b7",
  "\\'b8","\\'b9","\\'ba","\\'bb","\\'bc","\\'bd","\\'be","\\'bf",
  "\\'c0","\\'c1","\\'c2","\\'c3","\\'c4","\\'c5","\\'c6","\\'c7",
  "\\'c8","\\'c9","\\'ca","\\'cb","\\'cc","\\'cd","\\'ce","\\'cf",
  "\\'d0","\\'d1","\\'d2","\\'d3","\\'d4","\\'d5","\\'d6","\\'d7",
  "\\'d8","\\'d9","\\'da","\\'db","\\'dc","\\'dd","\\'de","\\'df",
  "\\'e0","\\'e1","\\'e2","\\'e3","\\'e4","\\'e5","\\'e6","\\'e7",
  "\\'e8","\\'e9","\\'ea","\\'eb","\\'ec","\\'ed","\\'ee","\\'ef",
  "\\'f0","\\'f1","\\'f2","\\'f3","\\'f4","\\'f5","\\'f6","\\'f7",
  "\\'f8","\\'f9","\\'fa","\\'fb","\\'fc","\\'fd","\\'fe","\\'ff"};

/* 256 entries */

/* ASCII to EBCDIC */
char asc2ebc[] = {
  0x00,0x01,0x02,0x03,0x37,0x2d,0x2e,0x2f,
  0x16,0x05,0x25,0x0b,0x0c,0x0d,0x0e,0x0f,
  0x10,0x11,0x12,0x13,0x3c,0x3d,0x32,0x26,
  0x18,0x19,0x3f,0x27,0x1c,0x1d,0x1e,0x1f,
  0x40,0x4f,0x7f,0x7b,0x5b,0x6c,0x50,0x7d,
  0x4d,0x5d,0x5c,0x4e,0x6b,0x60,0x4b,0x61,
  0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,
  0xf8,0xf9,0x7a,0x5e,0x4c,0x7e,0x6e,0x6f,
  0x7c,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,
  0xc8,0xc9,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,
  0xd7,0xd8,0xd9,0xe2,0xe3,0xe4,0xe5,0xe6,
  0xe7,0xe8,0xe9,0x4a,0xe0,0x5a,0x5f,0x6d,
  0x79,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
  0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,
  0x97,0x98,0x99,0xa2,0xa3,0xa4,0xa5,0xa6,
  0xa7,0xa8,0xa9,0xc0,0x6a,0xd0,0xa1,0x07,
  0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,
  0x28,0x29,0x2a,0x2b,0x2c,0x09,0x0a,0x1b,
  0x30,0x31,0x1a,0x33,0x34,0x35,0x36,0x08,
  0x38,0x39,0x3a,0x3b,0x04,0x14,0x3e,0xe1,
  0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,
  0x49,0x51,0x52,0x53,0x54,0x55,0x56,0x57,
  0x58,0x59,0x62,0x63,0x64,0x65,0x66,0x67,
  0x68,0x69,0x70,0x71,0x72,0x73,0x74,0x75,
  0x76,0x77,0x78,0x80,0x8a,0x8b,0x8c,0x8d,
  0x8e,0x8f,0x90,0x9a,0x9b,0x9c,0x9d,0x9e,
  0x9f,0xa0,0xaa,0xab,0xac,0xad,0xae,0xaf,
  0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,
  0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
  0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xda,0xdb,
  0xdc,0xdd,0xde,0xdf,0xea,0xeb,0xec,0xed,
  0xee,0xef,0xfa,0xfb,0xfc,0xfd,0xfe,0xff};

/* 256 entries */

/* EBCDIC to ASCII */
char ebc2asc[] = {
  0x00,0x01,0x02,0x03,0x9c,0x09,0x86,0x7f,
  0x97,0x8d,0x8e,0x0b,0x0c,0x0d,0x0e,0x0f,
  0x10,0x11,0x12,0x13,0x9d,0x85,0x08,0x87,
  0x18,0x19,0x92,0x8f,0x1c,0x1d,0x1e,0x1f,
  0x80,0x81,0x82,0x83,0x84,0x0a,0x17,0x1b,
  0x88,0x89,0x8a,0x8b,0x8c,0x05,0x06,0x07,
  0x90,0x91,0x16,0x93,0x94,0x95,0x96,0x04,
  0x98,0x99,0x9a,0x9b,0x14,0x15,0x9e,0x1a,
  0x20,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,
  0xa7,0xa8,0x5b,0x2e,0x3c,0x28,0x2b,0x21,
  0x26,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
  0xb0,0xb1,0x5d,0x24,0x2a,0x29,0x3b,0x5e,
  0x2d,0x2f,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,
  0xb8,0xb9,0x7c,0x2c,0x25,0x5f,0x3e,0x3f,
  0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,
  0xc2,0x60,0x3a,0x23,0x40,0x27,0x3d,0x22,
  0xc3,0x61,0x62,0x63,0x64,0x65,0x66,0x67,
  0x68,0x69,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,
  0xca,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,
  0x71,0x72,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,
  0xd1,0x7e,0x73,0x74,0x75,0x76,0x77,0x78,
  0x79,0x7a,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,
  0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
  0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,
  0x7b,0x41,0x42,0x43,0x44,0x45,0x46,0x47,
  0x48,0x49,0xe8,0xe9,0xea,0xeb,0xec,0xed,
  0x7d,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,
  0x51,0x52,0xee,0xef,0xf0,0xf1,0xf2,0xf3,
  0x5c,0x9f,0x53,0x54,0x55,0x56,0x57,0x58,
  0x59,0x5a,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,
  0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
  0x38,0x39,0xfa,0xfb,0xfc,0xfd,0xfe,0xff};

/* 256 entries */