trilogy 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of trilogy might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +74 -0
- data/Rakefile +18 -0
- data/ext/trilogy-ruby/cast.c +272 -0
- data/ext/trilogy-ruby/cext.c +933 -0
- data/ext/trilogy-ruby/extconf.rb +16 -0
- data/ext/trilogy-ruby/inc/trilogy/blocking.h +163 -0
- data/ext/trilogy-ruby/inc/trilogy/buffer.h +64 -0
- data/ext/trilogy-ruby/inc/trilogy/builder.h +161 -0
- data/ext/trilogy-ruby/inc/trilogy/charset.h +277 -0
- data/ext/trilogy-ruby/inc/trilogy/client.h +546 -0
- data/ext/trilogy-ruby/inc/trilogy/error.h +43 -0
- data/ext/trilogy-ruby/inc/trilogy/packet_parser.h +34 -0
- data/ext/trilogy-ruby/inc/trilogy/protocol.h +756 -0
- data/ext/trilogy-ruby/inc/trilogy/reader.h +212 -0
- data/ext/trilogy-ruby/inc/trilogy/socket.h +111 -0
- data/ext/trilogy-ruby/inc/trilogy/vendor/curl_hostcheck.h +29 -0
- data/ext/trilogy-ruby/inc/trilogy/vendor/openssl_hostname_validation.h +51 -0
- data/ext/trilogy-ruby/inc/trilogy.h +8 -0
- data/ext/trilogy-ruby/src/blocking.c +241 -0
- data/ext/trilogy-ruby/src/buffer.c +60 -0
- data/ext/trilogy-ruby/src/builder.c +198 -0
- data/ext/trilogy-ruby/src/charset.c +212 -0
- data/ext/trilogy-ruby/src/client.c +728 -0
- data/ext/trilogy-ruby/src/error.c +17 -0
- data/ext/trilogy-ruby/src/packet_parser.c +140 -0
- data/ext/trilogy-ruby/src/protocol.c +676 -0
- data/ext/trilogy-ruby/src/reader.c +244 -0
- data/ext/trilogy-ruby/src/socket.c +623 -0
- data/ext/trilogy-ruby/src/vendor/curl_hostcheck.c +206 -0
- data/ext/trilogy-ruby/src/vendor/openssl_hostname_validation.c +175 -0
- data/ext/trilogy-ruby/trilogy-ruby.h +36 -0
- data/lib/trilogy/version.rb +3 -0
- data/lib/trilogy.rb +61 -0
- data/trilogy.gemspec +27 -0
- metadata +106 -0
@@ -0,0 +1,277 @@
|
|
1
|
+
#ifndef TRILOGY_CHARSET_H
|
2
|
+
#define TRILOGY_CHARSET_H
|
3
|
+
|
4
|
+
#define TRILOGY_CHARSETS(XX) \
|
5
|
+
XX(TRILOGY_CHARSET_NONE, 0) \
|
6
|
+
XX(TRILOGY_CHARSET_BIG5_CHINESE_CI, 1) \
|
7
|
+
XX(TRILOGY_CHARSET_LATIN2_CZECH_CS, 2) \
|
8
|
+
XX(TRILOGY_CHARSET_DEC8_SWEDISH_CI, 3) \
|
9
|
+
XX(TRILOGY_CHARSET_CP850_GENERAL_CI, 4) \
|
10
|
+
XX(TRILOGY_CHARSET_LATIN1_GERMAN1_CI, 5) \
|
11
|
+
XX(TRILOGY_CHARSET_HP8_ENGLISH_CI, 6) \
|
12
|
+
XX(TRILOGY_CHARSET_KOI8R_GENERAL_CI, 7) \
|
13
|
+
XX(TRILOGY_CHARSET_LATIN1_SWEDISH_CI, 8) \
|
14
|
+
XX(TRILOGY_CHARSET_LATIN2_GENERAL_CI, 9) \
|
15
|
+
XX(TRILOGY_CHARSET_SWE7_SWEDISH_CI, 10) \
|
16
|
+
XX(TRILOGY_CHARSET_ASCII_GENERAL_CI, 11) \
|
17
|
+
XX(TRILOGY_CHARSET_UJIS_JAPANESE_CI, 12) \
|
18
|
+
XX(TRILOGY_CHARSET_SJIS_JAPANESE_CI, 13) \
|
19
|
+
XX(TRILOGY_CHARSET_CP1251_BULGARIAN_CI, 14) \
|
20
|
+
XX(TRILOGY_CHARSET_LATIN1_DANISH_CI, 15) \
|
21
|
+
XX(TRILOGY_CHARSET_HEBREW_GENERAL_CI, 16) \
|
22
|
+
XX(TRILOGY_CHARSET_TIS620_THAI_CI, 18) \
|
23
|
+
XX(TRILOGY_CHARSET_EUCKR_KOREAN_CI, 19) \
|
24
|
+
XX(TRILOGY_CHARSET_LATIN7_ESTONIAN_CS, 20) \
|
25
|
+
XX(TRILOGY_CHARSET_LATIN2_HUNGARIAN_CI, 21) \
|
26
|
+
XX(TRILOGY_CHARSET_KOI8U_GENERAL_CI, 22) \
|
27
|
+
XX(TRILOGY_CHARSET_CP1251_UKRAINIAN_CI, 23) \
|
28
|
+
XX(TRILOGY_CHARSET_GB2312_CHINESE_CI, 24) \
|
29
|
+
XX(TRILOGY_CHARSET_GREEK_GENERAL_CI, 25) \
|
30
|
+
XX(TRILOGY_CHARSET_CP1250_GENERAL_CI, 26) \
|
31
|
+
XX(TRILOGY_CHARSET_LATIN2_CROATIAN_CI, 27) \
|
32
|
+
XX(TRILOGY_CHARSET_GBK_CHINESE_CI, 28) \
|
33
|
+
XX(TRILOGY_CHARSET_CP1257_LITHUANIAN_CI, 29) \
|
34
|
+
XX(TRILOGY_CHARSET_LATIN5_TURKISH_CI, 30) \
|
35
|
+
XX(TRILOGY_CHARSET_LATIN1_GERMAN2_CI, 31) \
|
36
|
+
XX(TRILOGY_CHARSET_ARMSCII8_GENERAL_CI, 32) \
|
37
|
+
XX(TRILOGY_CHARSET_UTF8_GENERAL_CI, 33) \
|
38
|
+
XX(TRILOGY_CHARSET_CP1250_CZECH_CS, 34) \
|
39
|
+
XX(TRILOGY_CHARSET_UCS2_GENERAL_CI, 35) \
|
40
|
+
XX(TRILOGY_CHARSET_CP866_GENERAL_CI, 36) \
|
41
|
+
XX(TRILOGY_CHARSET_KEYBCS2_GENERAL_CI, 37) \
|
42
|
+
XX(TRILOGY_CHARSET_MACCE_GENERAL_CI, 38) \
|
43
|
+
XX(TRILOGY_CHARSET_MACROMAN_GENERAL_CI, 39) \
|
44
|
+
XX(TRILOGY_CHARSET_CP852_GENERAL_CI, 40) \
|
45
|
+
XX(TRILOGY_CHARSET_LATIN7_GENERAL_CI, 41) \
|
46
|
+
XX(TRILOGY_CHARSET_LATIN7_GENERAL_CS, 42) \
|
47
|
+
XX(TRILOGY_CHARSET_MACCE_BIN, 43) \
|
48
|
+
XX(TRILOGY_CHARSET_CP1250_CROATIAN_CI, 44) \
|
49
|
+
XX(TRILOGY_CHARSET_UTF8MB4_GENERAL_CI, 45) \
|
50
|
+
XX(TRILOGY_CHARSET_UTF8MB4_BIN, 46) \
|
51
|
+
XX(TRILOGY_CHARSET_LATIN1_BIN, 47) \
|
52
|
+
XX(TRILOGY_CHARSET_LATIN1_GENERAL_CI, 48) \
|
53
|
+
XX(TRILOGY_CHARSET_LATIN1_GENERAL_CS, 49) \
|
54
|
+
XX(TRILOGY_CHARSET_CP1251_BIN, 50) \
|
55
|
+
XX(TRILOGY_CHARSET_CP1251_GENERAL_CI, 51) \
|
56
|
+
XX(TRILOGY_CHARSET_CP1251_GENERAL_CS, 52) \
|
57
|
+
XX(TRILOGY_CHARSET_MACROMAN_BIN, 53) \
|
58
|
+
XX(TRILOGY_CHARSET_UTF16_GENERAL_CI, 54) \
|
59
|
+
XX(TRILOGY_CHARSET_UTF16_BIN, 55) \
|
60
|
+
XX(TRILOGY_CHARSET_CP1256_GENERAL_CI, 57) \
|
61
|
+
XX(TRILOGY_CHARSET_CP1257_BIN, 58) \
|
62
|
+
XX(TRILOGY_CHARSET_CP1257_GENERAL_CI, 59) \
|
63
|
+
XX(TRILOGY_CHARSET_UTF32_GENERAL_CI, 60) \
|
64
|
+
XX(TRILOGY_CHARSET_UTF32_BIN, 61) \
|
65
|
+
XX(TRILOGY_CHARSET_BINARY, 63) \
|
66
|
+
XX(TRILOGY_CHARSET_ARMSCII8_BIN, 64) \
|
67
|
+
XX(TRILOGY_CHARSET_ASCII_BIN, 65) \
|
68
|
+
XX(TRILOGY_CHARSET_CP1250_BIN, 66) \
|
69
|
+
XX(TRILOGY_CHARSET_CP1256_BIN, 67) \
|
70
|
+
XX(TRILOGY_CHARSET_CP866_BIN, 68) \
|
71
|
+
XX(TRILOGY_CHARSET_DEC8_BIN, 69) \
|
72
|
+
XX(TRILOGY_CHARSET_GREEK_BIN, 70) \
|
73
|
+
XX(TRILOGY_CHARSET_HEBREW_BIN, 71) \
|
74
|
+
XX(TRILOGY_CHARSET_HP8_BIN, 72) \
|
75
|
+
XX(TRILOGY_CHARSET_KEYBCS2_BIN, 73) \
|
76
|
+
XX(TRILOGY_CHARSET_KOI8R_BIN, 74) \
|
77
|
+
XX(TRILOGY_CHARSET_KOI8U_BIN, 75) \
|
78
|
+
XX(TRILOGY_CHARSET_LATIN2_BIN, 77) \
|
79
|
+
XX(TRILOGY_CHARSET_LATIN5_BIN, 78) \
|
80
|
+
XX(TRILOGY_CHARSET_LATIN7_BIN, 79) \
|
81
|
+
XX(TRILOGY_CHARSET_CP850_BIN, 80) \
|
82
|
+
XX(TRILOGY_CHARSET_CP852_BIN, 81) \
|
83
|
+
XX(TRILOGY_CHARSET_SWE7_BIN, 82) \
|
84
|
+
XX(TRILOGY_CHARSET_UTF8_BIN, 83) \
|
85
|
+
XX(TRILOGY_CHARSET_BIG5_BIN, 84) \
|
86
|
+
XX(TRILOGY_CHARSET_EUCKR_BIN, 85) \
|
87
|
+
XX(TRILOGY_CHARSET_GB2312_BIN, 86) \
|
88
|
+
XX(TRILOGY_CHARSET_GBK_BIN, 87) \
|
89
|
+
XX(TRILOGY_CHARSET_SJIS_BIN, 88) \
|
90
|
+
XX(TRILOGY_CHARSET_TIS620_BIN, 89) \
|
91
|
+
XX(TRILOGY_CHARSET_UCS2_BIN, 90) \
|
92
|
+
XX(TRILOGY_CHARSET_UJIS_BIN, 91) \
|
93
|
+
XX(TRILOGY_CHARSET_GEOSTD8_GENERAL_CI, 92) \
|
94
|
+
XX(TRILOGY_CHARSET_GEOSTD8_BIN, 93) \
|
95
|
+
XX(TRILOGY_CHARSET_LATIN1_SPANISH_CI, 94) \
|
96
|
+
XX(TRILOGY_CHARSET_CP932_JAPANESE_CI, 95) \
|
97
|
+
XX(TRILOGY_CHARSET_CP932_BIN, 96) \
|
98
|
+
XX(TRILOGY_CHARSET_EUCJPMS_JAPANESE_CI, 97) \
|
99
|
+
XX(TRILOGY_CHARSET_EUCJPMS_BIN, 98) \
|
100
|
+
XX(TRILOGY_CHARSET_CP1250_POLISH_CI, 99) \
|
101
|
+
XX(TRILOGY_CHARSET_UTF16_UNICODE_CI, 101) \
|
102
|
+
XX(TRILOGY_CHARSET_UTF16_ICELANDIC_CI, 102) \
|
103
|
+
XX(TRILOGY_CHARSET_UTF16_LATVIAN_CI, 103) \
|
104
|
+
XX(TRILOGY_CHARSET_UTF16_ROMANIAN_CI, 104) \
|
105
|
+
XX(TRILOGY_CHARSET_UTF16_SLOVENIAN_CI, 105) \
|
106
|
+
XX(TRILOGY_CHARSET_UTF16_POLISH_CI, 106) \
|
107
|
+
XX(TRILOGY_CHARSET_UTF16_ESTONIAN_CI, 107) \
|
108
|
+
XX(TRILOGY_CHARSET_UTF16_SPANISH_CI, 108) \
|
109
|
+
XX(TRILOGY_CHARSET_UTF16_SWEDISH_CI, 109) \
|
110
|
+
XX(TRILOGY_CHARSET_UTF16_TURKISH_CI, 110) \
|
111
|
+
XX(TRILOGY_CHARSET_UTF16_CZECH_CI, 111) \
|
112
|
+
XX(TRILOGY_CHARSET_UTF16_DANISH_CI, 112) \
|
113
|
+
XX(TRILOGY_CHARSET_UTF16_LITHUANIAN_CI, 113) \
|
114
|
+
XX(TRILOGY_CHARSET_UTF16_SLOVAK_CI, 114) \
|
115
|
+
XX(TRILOGY_CHARSET_UTF16_SPANISH2_CI, 115) \
|
116
|
+
XX(TRILOGY_CHARSET_UTF16_ROMAN_CI, 116) \
|
117
|
+
XX(TRILOGY_CHARSET_UTF16_PERSIAN_CI, 117) \
|
118
|
+
XX(TRILOGY_CHARSET_UTF16_ESPERANTO_CI, 118) \
|
119
|
+
XX(TRILOGY_CHARSET_UTF16_HUNGARIAN_CI, 119) \
|
120
|
+
XX(TRILOGY_CHARSET_UTF16_SINHALA_CI, 120) \
|
121
|
+
XX(TRILOGY_CHARSET_UCS2_UNICODE_CI, 128) \
|
122
|
+
XX(TRILOGY_CHARSET_UCS2_ICELANDIC_CI, 129) \
|
123
|
+
XX(TRILOGY_CHARSET_UCS2_LATVIAN_CI, 130) \
|
124
|
+
XX(TRILOGY_CHARSET_UCS2_ROMANIAN_CI, 131) \
|
125
|
+
XX(TRILOGY_CHARSET_UCS2_SLOVENIAN_CI, 132) \
|
126
|
+
XX(TRILOGY_CHARSET_UCS2_POLISH_CI, 133) \
|
127
|
+
XX(TRILOGY_CHARSET_UCS2_ESTONIAN_CI, 134) \
|
128
|
+
XX(TRILOGY_CHARSET_UCS2_SPANISH_CI, 135) \
|
129
|
+
XX(TRILOGY_CHARSET_UCS2_SWEDISH_CI, 136) \
|
130
|
+
XX(TRILOGY_CHARSET_UCS2_TURKISH_CI, 137) \
|
131
|
+
XX(TRILOGY_CHARSET_UCS2_CZECH_CI, 138) \
|
132
|
+
XX(TRILOGY_CHARSET_UCS2_DANISH_CI, 139) \
|
133
|
+
XX(TRILOGY_CHARSET_UCS2_LITHUANIAN_CI, 140) \
|
134
|
+
XX(TRILOGY_CHARSET_UCS2_SLOVAK_CI, 141) \
|
135
|
+
XX(TRILOGY_CHARSET_UCS2_SPANISH2_CI, 142) \
|
136
|
+
XX(TRILOGY_CHARSET_UCS2_ROMAN_CI, 143) \
|
137
|
+
XX(TRILOGY_CHARSET_UCS2_PERSIAN_CI, 144) \
|
138
|
+
XX(TRILOGY_CHARSET_UCS2_ESPERANTO_CI, 145) \
|
139
|
+
XX(TRILOGY_CHARSET_UCS2_HUNGARIAN_CI, 146) \
|
140
|
+
XX(TRILOGY_CHARSET_UCS2_SINHALA_CI, 147) \
|
141
|
+
XX(TRILOGY_CHARSET_UCS2_GENERAL_MYSQL500_CI, 159) \
|
142
|
+
XX(TRILOGY_CHARSET_UTF32_UNICODE_CI, 160) \
|
143
|
+
XX(TRILOGY_CHARSET_UTF32_ICELANDIC_CI, 161) \
|
144
|
+
XX(TRILOGY_CHARSET_UTF32_LATVIAN_CI, 162) \
|
145
|
+
XX(TRILOGY_CHARSET_UTF32_ROMANIAN_CI, 163) \
|
146
|
+
XX(TRILOGY_CHARSET_UTF32_SLOVENIAN_CI, 164) \
|
147
|
+
XX(TRILOGY_CHARSET_UTF32_POLISH_CI, 165) \
|
148
|
+
XX(TRILOGY_CHARSET_UTF32_ESTONIAN_CI, 166) \
|
149
|
+
XX(TRILOGY_CHARSET_UTF32_SPANISH_CI, 167) \
|
150
|
+
XX(TRILOGY_CHARSET_UTF32_SWEDISH_CI, 168) \
|
151
|
+
XX(TRILOGY_CHARSET_UTF32_TURKISH_CI, 169) \
|
152
|
+
XX(TRILOGY_CHARSET_UTF32_CZECH_CI, 170) \
|
153
|
+
XX(TRILOGY_CHARSET_UTF32_DANISH_CI, 171) \
|
154
|
+
XX(TRILOGY_CHARSET_UTF32_LITHUANIAN_CI, 172) \
|
155
|
+
XX(TRILOGY_CHARSET_UTF32_SLOVAK_CI, 173) \
|
156
|
+
XX(TRILOGY_CHARSET_UTF32_SPANISH2_CI, 174) \
|
157
|
+
XX(TRILOGY_CHARSET_UTF32_ROMAN_CI, 175) \
|
158
|
+
XX(TRILOGY_CHARSET_UTF32_PERSIAN_CI, 176) \
|
159
|
+
XX(TRILOGY_CHARSET_UTF32_ESPERANTO_CI, 177) \
|
160
|
+
XX(TRILOGY_CHARSET_UTF32_HUNGARIAN_CI, 178) \
|
161
|
+
XX(TRILOGY_CHARSET_UTF32_SINHALA_CI, 179) \
|
162
|
+
XX(TRILOGY_CHARSET_UTF8_UNICODE_CI, 192) \
|
163
|
+
XX(TRILOGY_CHARSET_UTF8_ICELANDIC_CI, 193) \
|
164
|
+
XX(TRILOGY_CHARSET_UTF8_LATVIAN_CI, 194) \
|
165
|
+
XX(TRILOGY_CHARSET_UTF8_ROMANIAN_CI, 195) \
|
166
|
+
XX(TRILOGY_CHARSET_UTF8_SLOVENIAN_CI, 196) \
|
167
|
+
XX(TRILOGY_CHARSET_UTF8_POLISH_CI, 197) \
|
168
|
+
XX(TRILOGY_CHARSET_UTF8_ESTONIAN_CI, 198) \
|
169
|
+
XX(TRILOGY_CHARSET_UTF8_SPANISH_CI, 199) \
|
170
|
+
XX(TRILOGY_CHARSET_UTF8_SWEDISH_CI, 200) \
|
171
|
+
XX(TRILOGY_CHARSET_UTF8_TURKISH_CI, 201) \
|
172
|
+
XX(TRILOGY_CHARSET_UTF8_CZECH_CI, 202) \
|
173
|
+
XX(TRILOGY_CHARSET_UTF8_DANISH_CI, 203) \
|
174
|
+
XX(TRILOGY_CHARSET_UTF8_LITHUANIAN_CI, 204) \
|
175
|
+
XX(TRILOGY_CHARSET_UTF8_SLOVAK_CI, 205) \
|
176
|
+
XX(TRILOGY_CHARSET_UTF8_SPANISH2_CI, 206) \
|
177
|
+
XX(TRILOGY_CHARSET_UTF8_ROMAN_CI, 207) \
|
178
|
+
XX(TRILOGY_CHARSET_UTF8_PERSIAN_CI, 208) \
|
179
|
+
XX(TRILOGY_CHARSET_UTF8_ESPERANTO_CI, 209) \
|
180
|
+
XX(TRILOGY_CHARSET_UTF8_HUNGARIAN_CI, 210) \
|
181
|
+
XX(TRILOGY_CHARSET_UTF8_SINHALA_CI, 211) \
|
182
|
+
XX(TRILOGY_CHARSET_UTF8_GENERAL_MYSQL500_CI, 223) \
|
183
|
+
XX(TRILOGY_CHARSET_UTF8MB4_UNICODE_CI, 224) \
|
184
|
+
XX(TRILOGY_CHARSET_UTF8MB4_ICELANDIC_CI, 225) \
|
185
|
+
XX(TRILOGY_CHARSET_UTF8MB4_LATVIAN_CI, 226) \
|
186
|
+
XX(TRILOGY_CHARSET_UTF8MB4_ROMANIAN_CI, 227) \
|
187
|
+
XX(TRILOGY_CHARSET_UTF8MB4_SLOVENIAN_CI, 228) \
|
188
|
+
XX(TRILOGY_CHARSET_UTF8MB4_POLISH_CI, 229) \
|
189
|
+
XX(TRILOGY_CHARSET_UTF8MB4_ESTONIAN_CI, 230) \
|
190
|
+
XX(TRILOGY_CHARSET_UTF8MB4_SPANISH_CI, 231) \
|
191
|
+
XX(TRILOGY_CHARSET_UTF8MB4_SWEDISH_CI, 232) \
|
192
|
+
XX(TRILOGY_CHARSET_UTF8MB4_TURKISH_CI, 233) \
|
193
|
+
XX(TRILOGY_CHARSET_UTF8MB4_CZECH_CI, 234) \
|
194
|
+
XX(TRILOGY_CHARSET_UTF8MB4_DANISH_CI, 235) \
|
195
|
+
XX(TRILOGY_CHARSET_UTF8MB4_LITHUANIAN_CI, 236) \
|
196
|
+
XX(TRILOGY_CHARSET_UTF8MB4_SLOVAK_CI, 237) \
|
197
|
+
XX(TRILOGY_CHARSET_UTF8MB4_SPANISH2_CI, 238) \
|
198
|
+
XX(TRILOGY_CHARSET_UTF8MB4_ROMAN_CI, 239) \
|
199
|
+
XX(TRILOGY_CHARSET_UTF8MB4_PERSIAN_CI, 240) \
|
200
|
+
XX(TRILOGY_CHARSET_UTF8MB4_ESPERANTO_CI, 241) \
|
201
|
+
XX(TRILOGY_CHARSET_UTF8MB4_HUNGARIAN_CI, 242) \
|
202
|
+
XX(TRILOGY_CHARSET_UTF8MB4_SINHALA_CI, 243) \
|
203
|
+
XX(TRILOGY_CHARSET_UTF8MB4_GERMAN2_CI, 244) \
|
204
|
+
XX(TRILOGY_CHARSET_UTF8MB4_CROATIAN_CI, 245) \
|
205
|
+
XX(TRILOGY_CHARSET_UTF8MB4_UNICODE_520_CI, 246) \
|
206
|
+
XX(TRILOGY_CHARSET_UTF8MB4_VIETNAMESE_CI, 247) \
|
207
|
+
XX(TRILOGY_CHARSET_GB18030_CHINESE_CI, 248) \
|
208
|
+
XX(TRILOGY_CHARSET_GB18030_BIN_CI, 249) \
|
209
|
+
XX(TRILOGY_CHARSET_GB18030_UNICODE_520_CI, 250) \
|
210
|
+
XX(TRILOGY_CHARSET_UTF8MB4_0900_AI_CI, 255)
|
211
|
+
|
212
|
+
typedef enum {
|
213
|
+
#define XX(name, code) name = code,
|
214
|
+
TRILOGY_CHARSETS(XX)
|
215
|
+
#undef XX
|
216
|
+
TRILOGY_CHARSET_MAX
|
217
|
+
} TRILOGY_CHARSET_t;
|
218
|
+
|
219
|
+
#define TRILOGY_ENCODINGS(XX) \
|
220
|
+
XX(TRILOGY_ENCODING_NONE) \
|
221
|
+
XX(TRILOGY_ENCODING_BIG5) \
|
222
|
+
XX(TRILOGY_ENCODING_LATIN2) \
|
223
|
+
XX(TRILOGY_ENCODING_DEC8) \
|
224
|
+
XX(TRILOGY_ENCODING_CP850) \
|
225
|
+
XX(TRILOGY_ENCODING_LATIN1) \
|
226
|
+
XX(TRILOGY_ENCODING_HP8) \
|
227
|
+
XX(TRILOGY_ENCODING_KOI8R) \
|
228
|
+
XX(TRILOGY_ENCODING_SWE7) \
|
229
|
+
XX(TRILOGY_ENCODING_ASCII) \
|
230
|
+
XX(TRILOGY_ENCODING_UJIS) \
|
231
|
+
XX(TRILOGY_ENCODING_SJIS) \
|
232
|
+
XX(TRILOGY_ENCODING_CP1251) \
|
233
|
+
XX(TRILOGY_ENCODING_HEBREW) \
|
234
|
+
XX(TRILOGY_ENCODING_TIS620) \
|
235
|
+
XX(TRILOGY_ENCODING_EUCKR) \
|
236
|
+
XX(TRILOGY_ENCODING_LATIN7) \
|
237
|
+
XX(TRILOGY_ENCODING_KOI8U) \
|
238
|
+
XX(TRILOGY_ENCODING_GB2312) \
|
239
|
+
XX(TRILOGY_ENCODING_GREEK) \
|
240
|
+
XX(TRILOGY_ENCODING_CP1250) \
|
241
|
+
XX(TRILOGY_ENCODING_GBK) \
|
242
|
+
XX(TRILOGY_ENCODING_CP1257) \
|
243
|
+
XX(TRILOGY_ENCODING_LATIN5) \
|
244
|
+
XX(TRILOGY_ENCODING_ARMSCII8) \
|
245
|
+
XX(TRILOGY_ENCODING_UTF8) \
|
246
|
+
XX(TRILOGY_ENCODING_UCS2) \
|
247
|
+
XX(TRILOGY_ENCODING_CP866) \
|
248
|
+
XX(TRILOGY_ENCODING_KEYBCS2) \
|
249
|
+
XX(TRILOGY_ENCODING_MACCE) \
|
250
|
+
XX(TRILOGY_ENCODING_MACROMAN) \
|
251
|
+
XX(TRILOGY_ENCODING_CP852) \
|
252
|
+
XX(TRILOGY_ENCODING_UTF8MB4) \
|
253
|
+
XX(TRILOGY_ENCODING_UTF16) \
|
254
|
+
XX(TRILOGY_ENCODING_CP1256) \
|
255
|
+
XX(TRILOGY_ENCODING_UTF32) \
|
256
|
+
XX(TRILOGY_ENCODING_BINARY) \
|
257
|
+
XX(TRILOGY_ENCODING_GEOSTD8) \
|
258
|
+
XX(TRILOGY_ENCODING_CP932) \
|
259
|
+
XX(TRILOGY_ENCODING_EUCJPMS)
|
260
|
+
|
261
|
+
typedef enum {
|
262
|
+
#define XX(enc) enc,
|
263
|
+
TRILOGY_ENCODINGS(XX)
|
264
|
+
#undef XX
|
265
|
+
TRILOGY_ENCODING_MAX
|
266
|
+
} TRILOGY_ENCODING_t;
|
267
|
+
|
268
|
+
/* trilogy_encoding_from_charset - Lookup the TRILOGY_ENCODING_t for a
|
269
|
+
* TRILOGY_CHARSET_t collation.
|
270
|
+
*
|
271
|
+
* charset - A TRILOGY_CHARSET_t value.
|
272
|
+
*
|
273
|
+
* Returns an TRILOGY_ENCODING_t matching the collation passed in via `charset`.
|
274
|
+
*/
|
275
|
+
TRILOGY_ENCODING_t trilogy_encoding_from_charset(TRILOGY_CHARSET_t charset);
|
276
|
+
|
277
|
+
#endif
|