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
|
/* Mapping table for IBM1132.
Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <stdint.h>
static const uint32_t to_ucs4[256] =
{
[0x00] = 0x0000, [0x01] = 0x0001, [0x02] = 0x0002, [0x03] = 0x0003,
[0x04] = 0x009c, [0x05] = 0x0009, [0x06] = 0x0086, [0x07] = 0x007f,
[0x08] = 0x0097, [0x09] = 0x008d, [0x0a] = 0x008e, [0x0b] = 0x000b,
[0x0c] = 0x000c, [0x0d] = 0x000d, [0x0e] = 0x000e, [0x0f] = 0x000f,
[0x10] = 0x0010, [0x11] = 0x0011, [0x12] = 0x0012, [0x13] = 0x0013,
[0x14] = 0x009d, [0x15] = 0x0085, [0x16] = 0x0008, [0x17] = 0x0087,
[0x18] = 0x0018, [0x19] = 0x0019, [0x1a] = 0x0092, [0x1b] = 0x008f,
[0x1c] = 0x001c, [0x1d] = 0x001d, [0x1e] = 0x001e, [0x1f] = 0x001f,
[0x20] = 0x0080, [0x21] = 0x0081, [0x22] = 0x0082, [0x23] = 0x0083,
[0x24] = 0x0084, [0x25] = 0x000a, [0x26] = 0x0017, [0x27] = 0x001b,
[0x28] = 0x0088, [0x29] = 0x0089, [0x2a] = 0x008a, [0x2b] = 0x008b,
[0x2c] = 0x008c, [0x2d] = 0x0005, [0x2e] = 0x0006, [0x2f] = 0x0007,
[0x30] = 0x0090, [0x31] = 0x0091, [0x32] = 0x0016, [0x33] = 0x0093,
[0x34] = 0x0094, [0x35] = 0x0095, [0x36] = 0x0096, [0x37] = 0x0004,
[0x38] = 0x0098, [0x39] = 0x0099, [0x3a] = 0x009a, [0x3b] = 0x009b,
[0x3c] = 0x0014, [0x3d] = 0x0015, [0x3e] = 0x009e, [0x3f] = 0x001a,
[0x40] = 0x0020, [0x41] = 0x00a0, [0x42] = 0x0e81, [0x43] = 0x0e82,
[0x44] = 0x0e84, [0x45] = 0x0e87, [0x46] = 0x0e88, [0x47] = 0x0eaa,
[0x48] = 0x0e8a, [0x49] = 0x005b, [0x4a] = 0x00a2, [0x4b] = 0x002e,
[0x4c] = 0x003c, [0x4d] = 0x0028, [0x4e] = 0x002b, [0x4f] = 0x007c,
[0x50] = 0x0026, [0x52] = 0x0e8d, [0x53] = 0x0e94, [0x54] = 0x0e95,
[0x55] = 0x0e96, [0x56] = 0x0e97, [0x57] = 0x0e99, [0x58] = 0x0e9a,
[0x59] = 0x005d, [0x5a] = 0x0021, [0x5b] = 0x0024, [0x5c] = 0x002a,
[0x5d] = 0x0029, [0x5e] = 0x003b, [0x5f] = 0x00ac, [0x60] = 0x002d,
[0x61] = 0x002f, [0x62] = 0x0e9b, [0x63] = 0x0e9c, [0x64] = 0x0e9d,
[0x65] = 0x0e9e, [0x66] = 0x0e9f, [0x67] = 0x0ea1, [0x68] = 0x0ea2,
[0x69] = 0x005e, [0x6a] = 0x00a6, [0x6b] = 0x002c, [0x6c] = 0x0025,
[0x6d] = 0x005f, [0x6e] = 0x003e, [0x6f] = 0x003f, [0x70] = 0x006b,
[0x72] = 0x0ea3, [0x73] = 0x0ea5, [0x74] = 0x0ea7, [0x75] = 0x0eab,
[0x76] = 0x0ead, [0x77] = 0x0eae, [0x79] = 0x0060, [0x7a] = 0x003a,
[0x7b] = 0x0023, [0x7c] = 0x0040, [0x7d] = 0x0027, [0x7e] = 0x003d,
[0x7f] = 0x0022, [0x81] = 0x0061, [0x82] = 0x0062, [0x83] = 0x0063,
[0x84] = 0x0064, [0x85] = 0x0065, [0x86] = 0x0066, [0x87] = 0x0067,
[0x88] = 0x0068, [0x89] = 0x0069, [0x8c] = 0x0eaf, [0x8d] = 0x0eb0,
[0x8e] = 0x0eb2, [0x8f] = 0x0eb3, [0x91] = 0x006a, [0x92] = 0x006b,
[0x93] = 0x006c, [0x94]
|