3 typedef uint32_t pm_unicode_codepoint_t;
5 #define UNICODE_ALPHA_CODEPOINTS_LENGTH 1450
6 static const pm_unicode_codepoint_t unicode_alpha_codepoints[UNICODE_ALPHA_CODEPOINTS_LENGTH] = {
734 #define UNICODE_ALNUM_CODEPOINTS_LENGTH 1528
735 static const pm_unicode_codepoint_t unicode_alnum_codepoints[UNICODE_ALNUM_CODEPOINTS_LENGTH] = {
1502 #define UNICODE_ISUPPER_CODEPOINTS_LENGTH 1302
1503 static const pm_unicode_codepoint_t unicode_isupper_codepoints[UNICODE_ISUPPER_CODEPOINTS_LENGTH] = {
2166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2169 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
2170 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2171 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,
2172 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2173 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
2174 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2175 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
2177 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
2178 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2179 7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3,
2180 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2181 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3,
2189 pm_unicode_codepoint_match(pm_unicode_codepoint_t codepoint,
const pm_unicode_codepoint_t *codepoints,
size_t size) {
2193 while (start < end) {
2194 size_t middle = start + (end - start) / 2;
2195 if ((middle % 2) != 0) middle--;
2197 if (codepoint >= codepoints[middle] && codepoint <= codepoints[middle + 1]) {
2201 if (codepoint < codepoints[middle]) {
2234 static const uint8_t pm_utf_8_dfa[] = {
2235 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2236 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2237 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2238 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2239 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
2240 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
2241 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
2242 0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3,
2243 0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,
2244 0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1,
2245 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1,
2246 1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,
2247 1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1,
2248 1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2256 static pm_unicode_codepoint_t
2257 pm_utf_8_codepoint(
const uint8_t *b, ptrdiff_t n,
size_t *width) {
2260 size_t maximum = (n > 4) ? 4 : ((
size_t) n);
2264 for (
size_t index = 0; index < maximum; index++) {
2265 uint32_t
byte = b[index];
2266 uint32_t
type = pm_utf_8_dfa[byte];
2268 codepoint = (state != 0) ?
2269 (
byte & 0x3fu) | (codepoint << 6) :
2270 (0xffu >>
type) & (byte);
2272 state = pm_utf_8_dfa[256 + (state * 16) +
type];
2275 return (pm_unicode_codepoint_t) codepoint;
2290 size_t maximum = (n > 4) ? 4 : ((
size_t) n);
2293 for (
size_t index = 0; index < maximum; index++) {
2294 state = pm_utf_8_dfa[256 + (state * 16) + pm_utf_8_dfa[b[index]]];
2295 if (state == 0)
return index + 1;
2312 pm_unicode_codepoint_t codepoint = pm_utf_8_codepoint(b, n, &width);
2314 if (codepoint <= 0xFF) {
2317 return pm_unicode_codepoint_match(codepoint, unicode_alpha_codepoints, UNICODE_ALPHA_CODEPOINTS_LENGTH) ? width : 0;
2332 pm_unicode_codepoint_t codepoint = pm_utf_8_codepoint(b, n, &width);
2334 if (codepoint <= 0xFF) {
2337 return pm_unicode_codepoint_match(codepoint, unicode_alnum_codepoints, UNICODE_ALNUM_CODEPOINTS_LENGTH) ? width : 0;
2352 pm_unicode_codepoint_t codepoint = pm_utf_8_codepoint(b, n, &width);
2354 if (codepoint <= 0xFF) {
2357 return pm_unicode_codepoint_match(codepoint, unicode_isupper_codepoints, UNICODE_ISUPPER_CODEPOINTS_LENGTH) ? true :
false;
2361 #ifndef PRISM_ENCODING_EXCLUDE_FULL
2363 static pm_unicode_codepoint_t
2364 pm_cesu_8_codepoint(
const uint8_t *b, ptrdiff_t n,
size_t *width) {
2367 return (pm_unicode_codepoint_t) b[0];
2370 if (n > 1 && b[0] >= 0xC2 && b[0] <= 0xDF && b[1] >= 0x80 && b[1] <= 0xBF) {
2374 return (pm_unicode_codepoint_t) (((b[0] & 0x1F) << 6) | (b[1] & 0x3F));
2377 if (n > 5 && b[0] == 0xED && b[1] >= 0xA0 && b[1] <= 0xAF && b[2] >= 0x80 && b[2] <= 0xBF && b[3] == 0xED && b[4] >= 0xB0 && b[4] <= 0xBF && b[5] >= 0x80 && b[5] <= 0xBF) {
2381 return (pm_unicode_codepoint_t) (0x10000 + (((b[1] & 0xF) << 16) | ((b[2] & 0x3F) << 10) | ((b[4] & 0xF) << 6) | (b[5] & 0x3F)));
2384 if (n > 2 && b[0] == 0xED && b[1] >= 0xA0 && b[1] <= 0xBF) {
2388 return (pm_unicode_codepoint_t) (0x10000 + (((b[0] & 0x03) << 16) | ((b[1] & 0x3F) << 10) | (b[2] & 0x3F)));
2391 if (n > 2 && ((b[0] == 0xE0 && b[1] >= 0xA0) || (b[0] >= 0xE1 && b[0] <= 0xEF && b[1] >= 0x80)) && b[1] <= 0xBF && b[2] >= 0x80 && b[2] <= 0xBF) {
2395 return (pm_unicode_codepoint_t) (((b[0] & 0xF) << 12) | ((b[1] & 0x3F) << 6) | (b[2] & 0x3F));
2403 pm_encoding_cesu_8_char_width(
const uint8_t *b, ptrdiff_t n) {
2405 pm_cesu_8_codepoint(b, n, &width);
2410 pm_encoding_cesu_8_alpha_char(
const uint8_t *b, ptrdiff_t n) {
2416 pm_unicode_codepoint_t codepoint = pm_cesu_8_codepoint(b, n, &width);
2418 if (codepoint <= 0xFF) {
2421 return pm_unicode_codepoint_match(codepoint, unicode_alpha_codepoints, UNICODE_ALPHA_CODEPOINTS_LENGTH) ? width : 0;
2426 pm_encoding_cesu_8_alnum_char(
const uint8_t *b, ptrdiff_t n) {
2432 pm_unicode_codepoint_t codepoint = pm_cesu_8_codepoint(b, n, &width);
2434 if (codepoint <= 0xFF) {
2437 return pm_unicode_codepoint_match(codepoint, unicode_alnum_codepoints, UNICODE_ALNUM_CODEPOINTS_LENGTH) ? width : 0;
2442 pm_encoding_cesu_8_isupper_char(
const uint8_t *b, ptrdiff_t n) {
2448 pm_unicode_codepoint_t codepoint = pm_cesu_8_codepoint(b, n, &width);
2450 if (codepoint <= 0xFF) {
2453 return pm_unicode_codepoint_match(codepoint, unicode_isupper_codepoints, UNICODE_ISUPPER_CODEPOINTS_LENGTH) ? true :
false;
2459 #undef UNICODE_ALPHA_CODEPOINTS_LENGTH
2460 #undef UNICODE_ALNUM_CODEPOINTS_LENGTH
2461 #undef UNICODE_ISUPPER_CODEPOINTS_LENGTH
2467 static const uint8_t pm_encoding_ascii_table[256] = {
2469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2470 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2471 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
2473 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2474 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,
2475 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2476 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
2477 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2478 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 3, 3, 3, 3, 3, 3, 3, 3,
3206 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0,
3213 static const uint8_t pm_encoding_iso_8859_13_table[256] = {
3215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3218 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
3219 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3220 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,
3221 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3222 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3225 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 7,
3226 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 3, 0, 0, 0, 0, 3,
3227 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3228 7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7, 7, 7, 3,
3229 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3230 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0,
3237 static const uint8_t pm_encoding_iso_8859_14_table[256] = {
3239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3240 0, 0, 0, 0, 0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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3357 static const uint8_t pm_encoding_mac_cent_euro_table[256] = {
3359 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3360 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3361 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3362 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
3363 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3364 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,
3365 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3366 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3367 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3368 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3369 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3370 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3371 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3372 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3373 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3374 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3381 static const uint8_t pm_encoding_mac_croatian_table[256] = {
3383 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3384 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3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, 0,
3501 static const uint8_t pm_encoding_mac_romania_table[256] = {
3503 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3505 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
3507 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3508 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,
3509 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3510 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3511 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3512 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3514 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3515 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3516 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3517 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3518 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3525 static const uint8_t pm_encoding_mac_thai_table[256] = {
3527 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3528 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3529 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3613 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3614 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3621 static const uint8_t pm_encoding_windows_1250_table[256] = {
3623 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3624 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3625 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
3627 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3628 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,
3629 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3630 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 7, 7, 7,
3632 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3,
3633 0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7,
3634 0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 3, 0, 7, 0, 3, 3,
3635 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3636 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3,
3637 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3638 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0,
3645 static const uint8_t pm_encoding_windows_1251_table[256] = {
3647 0, 0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 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3758 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3765 static const uint8_t pm_encoding_windows_1256_table[256] = {
3767 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3768 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3770 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
3771 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
3772 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0,
3773 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3774 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3775 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3777 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3778 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3779 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3780 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,
3781 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3782 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3789 static const uint8_t pm_encoding_windows_1257_table[256] = {
3791 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
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3847 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3848 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3849 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3850 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3851 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3852 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3853 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3854 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3857 #define PRISM_ENCODING_TABLE(name) \
3858 static size_t pm_encoding_ ##name ## _alpha_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) { \
3859 return (pm_encoding_ ##name ## _table[*b] & PRISM_ENCODING_ALPHABETIC_BIT); \
3861 static size_t pm_encoding_ ##name ## _alnum_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) { \
3862 return (pm_encoding_ ##name ## _table[*b] & PRISM_ENCODING_ALPHANUMERIC_BIT) ? 1 : 0; \
3864 static bool pm_encoding_ ##name ## _isupper_char(const uint8_t *b, PRISM_ATTRIBUTE_UNUSED ptrdiff_t n) { \
3865 return (pm_encoding_ ##name ## _table[*b] & PRISM_ENCODING_UPPERCASE_BIT); \
3868 PRISM_ENCODING_TABLE(cp850)
3869 PRISM_ENCODING_TABLE(cp852)
3870 PRISM_ENCODING_TABLE(cp855)
3871 PRISM_ENCODING_TABLE(gb1988)
3872 PRISM_ENCODING_TABLE(ibm437)
3873 PRISM_ENCODING_TABLE(ibm720)
3874 PRISM_ENCODING_TABLE(ibm737)
3875 PRISM_ENCODING_TABLE(ibm775)
3876 PRISM_ENCODING_TABLE(ibm852)
3877 PRISM_ENCODING_TABLE(ibm855)
3878 PRISM_ENCODING_TABLE(ibm857)
3879 PRISM_ENCODING_TABLE(ibm860)
3880 PRISM_ENCODING_TABLE(ibm861)
3881 PRISM_ENCODING_TABLE(ibm862)
3882 PRISM_ENCODING_TABLE(ibm863)
3883 PRISM_ENCODING_TABLE(ibm864)
3884 PRISM_ENCODING_TABLE(ibm865)
3885 PRISM_ENCODING_TABLE(ibm866)
3886 PRISM_ENCODING_TABLE(ibm869)
3887 PRISM_ENCODING_TABLE(iso_8859_1)
3888 PRISM_ENCODING_TABLE(iso_8859_2)
3889 PRISM_ENCODING_TABLE(iso_8859_3)
3890 PRISM_ENCODING_TABLE(iso_8859_4)
3891 PRISM_ENCODING_TABLE(iso_8859_5)
3892 PRISM_ENCODING_TABLE(iso_8859_6)
3893 PRISM_ENCODING_TABLE(iso_8859_7)
3894 PRISM_ENCODING_TABLE(iso_8859_8)
3895 PRISM_ENCODING_TABLE(iso_8859_9)
3896 PRISM_ENCODING_TABLE(iso_8859_10)
3897 PRISM_ENCODING_TABLE(iso_8859_11)
3898 PRISM_ENCODING_TABLE(iso_8859_13)
3899 PRISM_ENCODING_TABLE(iso_8859_14)
3900 PRISM_ENCODING_TABLE(iso_8859_15)
3901 PRISM_ENCODING_TABLE(iso_8859_16)
3902 PRISM_ENCODING_TABLE(koi8_r)
3903 PRISM_ENCODING_TABLE(koi8_u)
3904 PRISM_ENCODING_TABLE(mac_cent_euro)
3905 PRISM_ENCODING_TABLE(mac_croatian)
3906 PRISM_ENCODING_TABLE(mac_cyrillic)
3907 PRISM_ENCODING_TABLE(mac_greek)
3908 PRISM_ENCODING_TABLE(mac_iceland)
3909 PRISM_ENCODING_TABLE(mac_roman)
3910 PRISM_ENCODING_TABLE(mac_romania)
3911 PRISM_ENCODING_TABLE(mac_thai)
3912 PRISM_ENCODING_TABLE(mac_turkish)
3913 PRISM_ENCODING_TABLE(mac_ukraine)
3914 PRISM_ENCODING_TABLE(tis_620)
3915 PRISM_ENCODING_TABLE(windows_1250)
3916 PRISM_ENCODING_TABLE(windows_1251)
3917 PRISM_ENCODING_TABLE(windows_1252)
3918 PRISM_ENCODING_TABLE(windows_1253)
3919 PRISM_ENCODING_TABLE(windows_1254)
3920 PRISM_ENCODING_TABLE(windows_1255)
3921 PRISM_ENCODING_TABLE(windows_1256)
3922 PRISM_ENCODING_TABLE(windows_1257)
3923 PRISM_ENCODING_TABLE(windows_1258)
3924 PRISM_ENCODING_TABLE(windows_874)
3926 #undef PRISM_ENCODING_TABLE
3935 return *b < 0x80 ? 1 : 0;
3953 pm_encoding_ascii_alpha_char_7bit(
const uint8_t *b, ptrdiff_t n) {
3954 return (*b < 0x80) ? pm_encoding_ascii_alpha_char(b, n) : 0;
3972 pm_encoding_ascii_alnum_char_7bit(
const uint8_t *b, ptrdiff_t n) {
3973 return (*b < 0x80) ? pm_encoding_ascii_alnum_char(b, n) : 0;
3999 pm_encoding_euc_jp_char_width(
const uint8_t *b, ptrdiff_t n) {
4006 if ((n > 1) && ((b[0] == 0x8E) || (b[0] >= 0xA1 && b[0] <= 0xFE)) && (b[1] >= 0xA1 && b[1] <= 0xFE)) {
4011 if ((n > 2) && (b[0] == 0x8F) && (b[1] >= 0xA1 && b[2] <= 0xFE) && (b[2] >= 0xA1 && b[2] <= 0xFE)) {
4023 pm_encoding_euc_jp_isupper_char(
const uint8_t *b, ptrdiff_t n) {
4024 size_t width = pm_encoding_euc_jp_char_width(b, n);
4027 return pm_encoding_ascii_isupper_char(b, n);
4028 }
else if (width == 2) {
4030 (b[0] == 0xA3 && b[1] >= 0xC1 && b[1] <= 0xDA) ||
4031 (b[0] == 0xA6 && b[1] >= 0xA1 && b[1] <= 0xB8) ||
4032 (b[0] == 0xA7 && b[1] >= 0xA1 && b[1] <= 0xC1)
4044 pm_encoding_shift_jis_char_width(
const uint8_t *b, ptrdiff_t n) {
4046 if (b[0] < 0x80 || (b[0] >= 0xA1 && b[0] <= 0xDF)) {
4051 if ((n > 1) && ((b[0] >= 0x81 && b[0] <= 0x9F) || (b[0] >= 0xE0 && b[0] <= 0xFC)) && (b[1] >= 0x40 && b[1] <= 0xFC && b[1] != 0x7F)) {
4063 pm_encoding_shift_jis_alnum_char(
const uint8_t *b, ptrdiff_t n) {
4064 size_t width = pm_encoding_shift_jis_char_width(b, n);
4065 return width == 1 ? ((b[0] >= 0x80) || pm_encoding_ascii_alnum_char(b, n)) : width;
4073 pm_encoding_shift_jis_alpha_char(
const uint8_t *b, ptrdiff_t n) {
4074 size_t width = pm_encoding_shift_jis_char_width(b, n);
4075 return width == 1 ? ((b[0] >= 0x80) || pm_encoding_ascii_alpha_char(b, n)) : width;
4083 pm_encoding_shift_jis_isupper_char(
const uint8_t *b, ptrdiff_t n) {
4084 size_t width = pm_encoding_shift_jis_char_width(b, n);
4087 return pm_encoding_ascii_isupper_char(b, n);
4088 }
else if (width == 2) {
4090 ((b[0] == 0x82) && (b[1] >= 0x60 && b[1] <= 0x79)) ||
4091 ((b[0] == 0x83) && (b[1] >= 0x9F && b[1] <= 0xB6)) ||
4092 ((b[0] == 0x84) && (b[1] >= 0x40 && b[1] <= 0x60))
4099 #ifndef PRISM_ENCODING_EXCLUDE_FULL
4107 pm_encoding_ascii_isupper_char_7bit(
const uint8_t *b, ptrdiff_t n) {
4108 return (*b < 0x80) && pm_encoding_ascii_isupper_char(b, n);
4116 pm_encoding_big5_char_width(
const uint8_t *b, ptrdiff_t n) {
4123 if ((n > 1) && (b[0] >= 0xA1 && b[0] <= 0xFE) && ((b[1] >= 0x40 && b[1] <= 0x7E) || (b[1] >= 0xA1 && b[1] <= 0xFE))) {
4135 pm_encoding_cp949_char_width(
const uint8_t *b, ptrdiff_t n) {
4142 if ((n > 1) && (b[0] >= 0x81 && b[0] <= 0xFE) && ((b[1] >= 0x41 && b[1] <= 0x5A) || (b[1] >= 0x61 && b[1] <= 0x7A) || (b[1] >= 0x81 && b[1] <= 0xFE))) {
4154 pm_encoding_emacs_mule_char_width(
const uint8_t *b, ptrdiff_t n) {
4161 if ((n > 1) && (b[0] >= 0x81 && b[0] <= 0x8F) && (b[1] >= 0xA0)) {
4169 ((b[0] >= 0x90 && b[0] <= 0x99) && (b[1] >= 0xA0)) ||
4170 ((b[0] == 0x9A || b[0] == 0x9B) && (b[1] >= 0xE0 && b[1] <= 0xEF))
4181 ((b[0] == 0x9C) && (b[1] >= 0xF0) && (b[1] <= 0xF4)) ||
4182 ((b[0] == 0x9D) && (b[1] >= 0xF5) && (b[1] <= 0xFE))
4184 (b[2] >= 0xA0) && (b[3] >= 0xA0)
4197 pm_encoding_euc_kr_char_width(
const uint8_t *b, ptrdiff_t n) {
4204 if ((n > 1) && (b[0] >= 0xA1 && b[0] <= 0xFE) && (b[1] >= 0xA1 && b[1] <= 0xFE)) {
4216 pm_encoding_euc_tw_char_width(
const uint8_t *b, ptrdiff_t n) {
4223 if ((n > 1) && (b[0] >= 0xA1) && (b[0] <= 0xFE) && (b[1] >= 0xA1) && (b[1] <= 0xFE)) {
4228 if ((n > 3) && (b[0] == 0x8E) && (b[1] >= 0xA1) && (b[1] <= 0xB0) && (b[2] >= 0xA1) && (b[2] <= 0xFE) && (b[3] >= 0xA1) && (b[3] <= 0xFE)) {
4240 pm_encoding_gb18030_char_width(
const uint8_t *b, ptrdiff_t n) {
4247 if ((n > 1) && (b[0] >= 0x81 && b[0] <= 0xFE) && (b[1] >= 0x40 && b[1] <= 0xFE && b[1] != 0x7F)) {
4252 if ((n > 3) && ((b[0] >= 0x81 && b[0] <= 0xFE) && (b[1] >= 0x30 && b[1] <= 0x39) && (b[2] >= 0x81 && b[2] <= 0xFE) && (b[3] >= 0x30 && b[3] <= 0x39))) {
4264 pm_encoding_gbk_char_width(
const uint8_t *b, ptrdiff_t n) {
4274 ((b[0] >= 0xA1 && b[0] <= 0xA9) && (b[1] >= 0xA1 && b[1] <= 0xFE)) ||
4275 ((b[0] >= 0xB0 && b[0] <= 0xF7) && (b[1] >= 0xA1 && b[1] <= 0xFE)) ||
4276 ((b[0] >= 0x81 && b[0] <= 0xA0) && (b[1] >= 0x40 && b[1] <= 0xFE) && (b[1] != 0x7F)) ||
4277 ((b[0] >= 0xAA && b[0] <= 0xFE) && (b[1] >= 0x40 && b[1] <= 0xA0) && (b[1] != 0x7F)) ||
4278 ((b[0] >= 0xA8 && b[0] <= 0xA9) && (b[1] >= 0x40 && b[1] <= 0xA0) && (b[1] != 0x7F)) ||
4279 ((b[0] >= 0xAA && b[0] <= 0xAF) && (b[1] >= 0xA1 && b[1] <= 0xFE)) ||
4280 ((b[0] >= 0xF8 && b[0] <= 0xFE) && (b[1] >= 0xA1 && b[1] <= 0xFE)) ||
4281 ((b[0] >= 0xA1 && b[0] <= 0xA7) && (b[1] >= 0x40 && b[1] <= 0xA0) && (b[1] != 0x7F))
4296 [PM_ENCODING_UTF_8] = {
4304 [PM_ENCODING_US_ASCII] = {
4306 .char_width = pm_encoding_ascii_char_width,
4307 .alnum_char = pm_encoding_ascii_alnum_char,
4308 .alpha_char = pm_encoding_ascii_alpha_char,
4309 .isupper_char = pm_encoding_ascii_isupper_char,
4312 [PM_ENCODING_ASCII_8BIT] = {
4313 .name =
"ASCII-8BIT",
4314 .char_width = pm_encoding_single_char_width,
4315 .alnum_char = pm_encoding_ascii_alnum_char,
4316 .alpha_char = pm_encoding_ascii_alpha_char,
4317 .isupper_char = pm_encoding_ascii_isupper_char,
4320 [PM_ENCODING_EUC_JP] = {
4322 .char_width = pm_encoding_euc_jp_char_width,
4323 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4324 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4325 .isupper_char = pm_encoding_euc_jp_isupper_char,
4328 [PM_ENCODING_WINDOWS_31J] = {
4329 .name =
"Windows-31J",
4330 .char_width = pm_encoding_shift_jis_char_width,
4331 .alnum_char = pm_encoding_shift_jis_alnum_char,
4332 .alpha_char = pm_encoding_shift_jis_alpha_char,
4333 .isupper_char = pm_encoding_shift_jis_isupper_char,
4337 #ifndef PRISM_ENCODING_EXCLUDE_FULL
4338 [PM_ENCODING_BIG5] = {
4340 .char_width = pm_encoding_big5_char_width,
4341 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4342 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4343 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4346 [PM_ENCODING_BIG5_HKSCS] = {
4347 .name =
"Big5-HKSCS",
4348 .char_width = pm_encoding_big5_char_width,
4349 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4350 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4351 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4354 [PM_ENCODING_BIG5_UAO] = {
4356 .char_width = pm_encoding_big5_char_width,
4357 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4358 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4359 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4362 [PM_ENCODING_CESU_8] = {
4364 .char_width = pm_encoding_cesu_8_char_width,
4365 .alnum_char = pm_encoding_cesu_8_alnum_char,
4366 .alpha_char = pm_encoding_cesu_8_alpha_char,
4367 .isupper_char = pm_encoding_cesu_8_isupper_char,
4370 [PM_ENCODING_CP51932] = {
4372 .char_width = pm_encoding_euc_jp_char_width,
4373 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4374 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4375 .isupper_char = pm_encoding_euc_jp_isupper_char,
4378 [PM_ENCODING_CP850] = {
4380 .char_width = pm_encoding_single_char_width,
4381 .alnum_char = pm_encoding_cp850_alnum_char,
4382 .alpha_char = pm_encoding_cp850_alpha_char,
4383 .isupper_char = pm_encoding_cp850_isupper_char,
4386 [PM_ENCODING_CP852] = {
4388 .char_width = pm_encoding_single_char_width,
4389 .alnum_char = pm_encoding_cp852_alnum_char,
4390 .alpha_char = pm_encoding_cp852_alpha_char,
4391 .isupper_char = pm_encoding_cp852_isupper_char,
4394 [PM_ENCODING_CP855] = {
4396 .char_width = pm_encoding_single_char_width,
4397 .alnum_char = pm_encoding_cp855_alnum_char,
4398 .alpha_char = pm_encoding_cp855_alpha_char,
4399 .isupper_char = pm_encoding_cp855_isupper_char,
4402 [PM_ENCODING_CP949] = {
4404 .char_width = pm_encoding_cp949_char_width,
4405 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4406 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4407 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4410 [PM_ENCODING_CP950] = {
4412 .char_width = pm_encoding_big5_char_width,
4413 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4414 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4415 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4418 [PM_ENCODING_CP951] = {
4420 .char_width = pm_encoding_big5_char_width,
4421 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4422 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4423 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4426 [PM_ENCODING_EMACS_MULE] = {
4427 .name =
"Emacs-Mule",
4428 .char_width = pm_encoding_emacs_mule_char_width,
4429 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4430 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4431 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4434 [PM_ENCODING_EUC_JP_MS] = {
4436 .char_width = pm_encoding_euc_jp_char_width,
4437 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4438 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4439 .isupper_char = pm_encoding_euc_jp_isupper_char,
4442 [PM_ENCODING_EUC_JIS_2004] = {
4443 .name =
"EUC-JIS-2004",
4444 .char_width = pm_encoding_euc_jp_char_width,
4445 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4446 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4447 .isupper_char = pm_encoding_euc_jp_isupper_char,
4450 [PM_ENCODING_EUC_KR] = {
4452 .char_width = pm_encoding_euc_kr_char_width,
4453 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4454 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4455 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4458 [PM_ENCODING_EUC_TW] = {
4460 .char_width = pm_encoding_euc_tw_char_width,
4461 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4462 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4463 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4466 [PM_ENCODING_GB12345] = {
4468 .char_width = pm_encoding_euc_kr_char_width,
4469 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4470 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4471 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4474 [PM_ENCODING_GB18030] = {
4476 .char_width = pm_encoding_gb18030_char_width,
4477 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4478 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4479 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4482 [PM_ENCODING_GB1988] = {
4484 .char_width = pm_encoding_single_char_width,
4485 .alnum_char = pm_encoding_gb1988_alnum_char,
4486 .alpha_char = pm_encoding_gb1988_alpha_char,
4487 .isupper_char = pm_encoding_gb1988_isupper_char,
4490 [PM_ENCODING_GB2312] = {
4492 .char_width = pm_encoding_euc_kr_char_width,
4493 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4494 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4495 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4498 [PM_ENCODING_GBK] = {
4500 .char_width = pm_encoding_gbk_char_width,
4501 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4502 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4503 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4506 [PM_ENCODING_IBM437] = {
4508 .char_width = pm_encoding_single_char_width,
4509 .alnum_char = pm_encoding_ibm437_alnum_char,
4510 .alpha_char = pm_encoding_ibm437_alpha_char,
4511 .isupper_char = pm_encoding_ibm437_isupper_char,
4514 [PM_ENCODING_IBM720] = {
4516 .char_width = pm_encoding_single_char_width,
4517 .alnum_char = pm_encoding_ibm720_alnum_char,
4518 .alpha_char = pm_encoding_ibm720_alpha_char,
4519 .isupper_char = pm_encoding_ibm720_isupper_char,
4522 [PM_ENCODING_IBM737] = {
4524 .char_width = pm_encoding_single_char_width,
4525 .alnum_char = pm_encoding_ibm737_alnum_char,
4526 .alpha_char = pm_encoding_ibm737_alpha_char,
4527 .isupper_char = pm_encoding_ibm737_isupper_char,
4530 [PM_ENCODING_IBM775] = {
4532 .char_width = pm_encoding_single_char_width,
4533 .alnum_char = pm_encoding_ibm775_alnum_char,
4534 .alpha_char = pm_encoding_ibm775_alpha_char,
4535 .isupper_char = pm_encoding_ibm775_isupper_char,
4538 [PM_ENCODING_IBM852] = {
4540 .char_width = pm_encoding_single_char_width,
4541 .alnum_char = pm_encoding_ibm852_alnum_char,
4542 .alpha_char = pm_encoding_ibm852_alpha_char,
4543 .isupper_char = pm_encoding_ibm852_isupper_char,
4546 [PM_ENCODING_IBM855] = {
4548 .char_width = pm_encoding_single_char_width,
4549 .alnum_char = pm_encoding_ibm855_alnum_char,
4550 .alpha_char = pm_encoding_ibm855_alpha_char,
4551 .isupper_char = pm_encoding_ibm855_isupper_char,
4554 [PM_ENCODING_IBM857] = {
4556 .char_width = pm_encoding_single_char_width,
4557 .alnum_char = pm_encoding_ibm857_alnum_char,
4558 .alpha_char = pm_encoding_ibm857_alpha_char,
4559 .isupper_char = pm_encoding_ibm857_isupper_char,
4562 [PM_ENCODING_IBM860] = {
4564 .char_width = pm_encoding_single_char_width,
4565 .alnum_char = pm_encoding_ibm860_alnum_char,
4566 .alpha_char = pm_encoding_ibm860_alpha_char,
4567 .isupper_char = pm_encoding_ibm860_isupper_char,
4570 [PM_ENCODING_IBM861] = {
4572 .char_width = pm_encoding_single_char_width,
4573 .alnum_char = pm_encoding_ibm861_alnum_char,
4574 .alpha_char = pm_encoding_ibm861_alpha_char,
4575 .isupper_char = pm_encoding_ibm861_isupper_char,
4578 [PM_ENCODING_IBM862] = {
4580 .char_width = pm_encoding_single_char_width,
4581 .alnum_char = pm_encoding_ibm862_alnum_char,
4582 .alpha_char = pm_encoding_ibm862_alpha_char,
4583 .isupper_char = pm_encoding_ibm862_isupper_char,
4586 [PM_ENCODING_IBM863] = {
4588 .char_width = pm_encoding_single_char_width,
4589 .alnum_char = pm_encoding_ibm863_alnum_char,
4590 .alpha_char = pm_encoding_ibm863_alpha_char,
4591 .isupper_char = pm_encoding_ibm863_isupper_char,
4594 [PM_ENCODING_IBM864] = {
4596 .char_width = pm_encoding_single_char_width,
4597 .alnum_char = pm_encoding_ibm864_alnum_char,
4598 .alpha_char = pm_encoding_ibm864_alpha_char,
4599 .isupper_char = pm_encoding_ibm864_isupper_char,
4602 [PM_ENCODING_IBM865] = {
4604 .char_width = pm_encoding_single_char_width,
4605 .alnum_char = pm_encoding_ibm865_alnum_char,
4606 .alpha_char = pm_encoding_ibm865_alpha_char,
4607 .isupper_char = pm_encoding_ibm865_isupper_char,
4610 [PM_ENCODING_IBM866] = {
4612 .char_width = pm_encoding_single_char_width,
4613 .alnum_char = pm_encoding_ibm866_alnum_char,
4614 .alpha_char = pm_encoding_ibm866_alpha_char,
4615 .isupper_char = pm_encoding_ibm866_isupper_char,
4618 [PM_ENCODING_IBM869] = {
4620 .char_width = pm_encoding_single_char_width,
4621 .alnum_char = pm_encoding_ibm869_alnum_char,
4622 .alpha_char = pm_encoding_ibm869_alpha_char,
4623 .isupper_char = pm_encoding_ibm869_isupper_char,
4626 [PM_ENCODING_ISO_8859_1] = {
4627 .name =
"ISO-8859-1",
4628 .char_width = pm_encoding_single_char_width,
4629 .alnum_char = pm_encoding_iso_8859_1_alnum_char,
4630 .alpha_char = pm_encoding_iso_8859_1_alpha_char,
4631 .isupper_char = pm_encoding_iso_8859_1_isupper_char,
4634 [PM_ENCODING_ISO_8859_2] = {
4635 .name =
"ISO-8859-2",
4636 .char_width = pm_encoding_single_char_width,
4637 .alnum_char = pm_encoding_iso_8859_2_alnum_char,
4638 .alpha_char = pm_encoding_iso_8859_2_alpha_char,
4639 .isupper_char = pm_encoding_iso_8859_2_isupper_char,
4642 [PM_ENCODING_ISO_8859_3] = {
4643 .name =
"ISO-8859-3",
4644 .char_width = pm_encoding_single_char_width,
4645 .alnum_char = pm_encoding_iso_8859_3_alnum_char,
4646 .alpha_char = pm_encoding_iso_8859_3_alpha_char,
4647 .isupper_char = pm_encoding_iso_8859_3_isupper_char,
4650 [PM_ENCODING_ISO_8859_4] = {
4651 .name =
"ISO-8859-4",
4652 .char_width = pm_encoding_single_char_width,
4653 .alnum_char = pm_encoding_iso_8859_4_alnum_char,
4654 .alpha_char = pm_encoding_iso_8859_4_alpha_char,
4655 .isupper_char = pm_encoding_iso_8859_4_isupper_char,
4658 [PM_ENCODING_ISO_8859_5] = {
4659 .name =
"ISO-8859-5",
4660 .char_width = pm_encoding_single_char_width,
4661 .alnum_char = pm_encoding_iso_8859_5_alnum_char,
4662 .alpha_char = pm_encoding_iso_8859_5_alpha_char,
4663 .isupper_char = pm_encoding_iso_8859_5_isupper_char,
4666 [PM_ENCODING_ISO_8859_6] = {
4667 .name =
"ISO-8859-6",
4668 .char_width = pm_encoding_single_char_width,
4669 .alnum_char = pm_encoding_iso_8859_6_alnum_char,
4670 .alpha_char = pm_encoding_iso_8859_6_alpha_char,
4671 .isupper_char = pm_encoding_iso_8859_6_isupper_char,
4674 [PM_ENCODING_ISO_8859_7] = {
4675 .name =
"ISO-8859-7",
4676 .char_width = pm_encoding_single_char_width,
4677 .alnum_char = pm_encoding_iso_8859_7_alnum_char,
4678 .alpha_char = pm_encoding_iso_8859_7_alpha_char,
4679 .isupper_char = pm_encoding_iso_8859_7_isupper_char,
4682 [PM_ENCODING_ISO_8859_8] = {
4683 .name =
"ISO-8859-8",
4684 .char_width = pm_encoding_single_char_width,
4685 .alnum_char = pm_encoding_iso_8859_8_alnum_char,
4686 .alpha_char = pm_encoding_iso_8859_8_alpha_char,
4687 .isupper_char = pm_encoding_iso_8859_8_isupper_char,
4690 [PM_ENCODING_ISO_8859_9] = {
4691 .name =
"ISO-8859-9",
4692 .char_width = pm_encoding_single_char_width,
4693 .alnum_char = pm_encoding_iso_8859_9_alnum_char,
4694 .alpha_char = pm_encoding_iso_8859_9_alpha_char,
4695 .isupper_char = pm_encoding_iso_8859_9_isupper_char,
4698 [PM_ENCODING_ISO_8859_10] = {
4699 .name =
"ISO-8859-10",
4700 .char_width = pm_encoding_single_char_width,
4701 .alnum_char = pm_encoding_iso_8859_10_alnum_char,
4702 .alpha_char = pm_encoding_iso_8859_10_alpha_char,
4703 .isupper_char = pm_encoding_iso_8859_10_isupper_char,
4706 [PM_ENCODING_ISO_8859_11] = {
4707 .name =
"ISO-8859-11",
4708 .char_width = pm_encoding_single_char_width,
4709 .alnum_char = pm_encoding_iso_8859_11_alnum_char,
4710 .alpha_char = pm_encoding_iso_8859_11_alpha_char,
4711 .isupper_char = pm_encoding_iso_8859_11_isupper_char,
4714 [PM_ENCODING_ISO_8859_13] = {
4715 .name =
"ISO-8859-13",
4716 .char_width = pm_encoding_single_char_width,
4717 .alnum_char = pm_encoding_iso_8859_13_alnum_char,
4718 .alpha_char = pm_encoding_iso_8859_13_alpha_char,
4719 .isupper_char = pm_encoding_iso_8859_13_isupper_char,
4722 [PM_ENCODING_ISO_8859_14] = {
4723 .name =
"ISO-8859-14",
4724 .char_width = pm_encoding_single_char_width,
4725 .alnum_char = pm_encoding_iso_8859_14_alnum_char,
4726 .alpha_char = pm_encoding_iso_8859_14_alpha_char,
4727 .isupper_char = pm_encoding_iso_8859_14_isupper_char,
4730 [PM_ENCODING_ISO_8859_15] = {
4731 .name =
"ISO-8859-15",
4732 .char_width = pm_encoding_single_char_width,
4733 .alnum_char = pm_encoding_iso_8859_15_alnum_char,
4734 .alpha_char = pm_encoding_iso_8859_15_alpha_char,
4735 .isupper_char = pm_encoding_iso_8859_15_isupper_char,
4738 [PM_ENCODING_ISO_8859_16] = {
4739 .name =
"ISO-8859-16",
4740 .char_width = pm_encoding_single_char_width,
4741 .alnum_char = pm_encoding_iso_8859_16_alnum_char,
4742 .alpha_char = pm_encoding_iso_8859_16_alpha_char,
4743 .isupper_char = pm_encoding_iso_8859_16_isupper_char,
4746 [PM_ENCODING_KOI8_R] = {
4748 .char_width = pm_encoding_single_char_width,
4749 .alnum_char = pm_encoding_koi8_r_alnum_char,
4750 .alpha_char = pm_encoding_koi8_r_alpha_char,
4751 .isupper_char = pm_encoding_koi8_r_isupper_char,
4754 [PM_ENCODING_KOI8_U] = {
4756 .char_width = pm_encoding_single_char_width,
4757 .alnum_char = pm_encoding_koi8_u_alnum_char,
4758 .alpha_char = pm_encoding_koi8_u_alpha_char,
4759 .isupper_char = pm_encoding_koi8_u_isupper_char,
4762 [PM_ENCODING_MAC_CENT_EURO] = {
4763 .name =
"macCentEuro",
4764 .char_width = pm_encoding_single_char_width,
4765 .alnum_char = pm_encoding_mac_cent_euro_alnum_char,
4766 .alpha_char = pm_encoding_mac_cent_euro_alpha_char,
4767 .isupper_char = pm_encoding_mac_cent_euro_isupper_char,
4770 [PM_ENCODING_MAC_CROATIAN] = {
4771 .name =
"macCroatian",
4772 .char_width = pm_encoding_single_char_width,
4773 .alnum_char = pm_encoding_mac_croatian_alnum_char,
4774 .alpha_char = pm_encoding_mac_croatian_alpha_char,
4775 .isupper_char = pm_encoding_mac_croatian_isupper_char,
4778 [PM_ENCODING_MAC_CYRILLIC] = {
4779 .name =
"macCyrillic",
4780 .char_width = pm_encoding_single_char_width,
4781 .alnum_char = pm_encoding_mac_cyrillic_alnum_char,
4782 .alpha_char = pm_encoding_mac_cyrillic_alpha_char,
4783 .isupper_char = pm_encoding_mac_cyrillic_isupper_char,
4786 [PM_ENCODING_MAC_GREEK] = {
4788 .char_width = pm_encoding_single_char_width,
4789 .alnum_char = pm_encoding_mac_greek_alnum_char,
4790 .alpha_char = pm_encoding_mac_greek_alpha_char,
4791 .isupper_char = pm_encoding_mac_greek_isupper_char,
4794 [PM_ENCODING_MAC_ICELAND] = {
4795 .name =
"macIceland",
4796 .char_width = pm_encoding_single_char_width,
4797 .alnum_char = pm_encoding_mac_iceland_alnum_char,
4798 .alpha_char = pm_encoding_mac_iceland_alpha_char,
4799 .isupper_char = pm_encoding_mac_iceland_isupper_char,
4802 [PM_ENCODING_MAC_JAPANESE] = {
4803 .name =
"MacJapanese",
4804 .char_width = pm_encoding_shift_jis_char_width,
4805 .alnum_char = pm_encoding_shift_jis_alnum_char,
4806 .alpha_char = pm_encoding_shift_jis_alpha_char,
4807 .isupper_char = pm_encoding_shift_jis_isupper_char,
4810 [PM_ENCODING_MAC_ROMAN] = {
4812 .char_width = pm_encoding_single_char_width,
4813 .alnum_char = pm_encoding_mac_roman_alnum_char,
4814 .alpha_char = pm_encoding_mac_roman_alpha_char,
4815 .isupper_char = pm_encoding_mac_roman_isupper_char,
4818 [PM_ENCODING_MAC_ROMANIA] = {
4819 .name =
"macRomania",
4820 .char_width = pm_encoding_single_char_width,
4821 .alnum_char = pm_encoding_mac_romania_alnum_char,
4822 .alpha_char = pm_encoding_mac_romania_alpha_char,
4823 .isupper_char = pm_encoding_mac_romania_isupper_char,
4826 [PM_ENCODING_MAC_THAI] = {
4828 .char_width = pm_encoding_single_char_width,
4829 .alnum_char = pm_encoding_mac_thai_alnum_char,
4830 .alpha_char = pm_encoding_mac_thai_alpha_char,
4831 .isupper_char = pm_encoding_mac_thai_isupper_char,
4834 [PM_ENCODING_MAC_TURKISH] = {
4835 .name =
"macTurkish",
4836 .char_width = pm_encoding_single_char_width,
4837 .alnum_char = pm_encoding_mac_turkish_alnum_char,
4838 .alpha_char = pm_encoding_mac_turkish_alpha_char,
4839 .isupper_char = pm_encoding_mac_turkish_isupper_char,
4842 [PM_ENCODING_MAC_UKRAINE] = {
4843 .name =
"macUkraine",
4844 .char_width = pm_encoding_single_char_width,
4845 .alnum_char = pm_encoding_mac_ukraine_alnum_char,
4846 .alpha_char = pm_encoding_mac_ukraine_alpha_char,
4847 .isupper_char = pm_encoding_mac_ukraine_isupper_char,
4850 [PM_ENCODING_SHIFT_JIS] = {
4851 .name =
"Shift_JIS",
4852 .char_width = pm_encoding_shift_jis_char_width,
4853 .alnum_char = pm_encoding_shift_jis_alnum_char,
4854 .alpha_char = pm_encoding_shift_jis_alpha_char,
4855 .isupper_char = pm_encoding_shift_jis_isupper_char,
4858 [PM_ENCODING_SJIS_DOCOMO] = {
4859 .name =
"SJIS-DoCoMo",
4860 .char_width = pm_encoding_shift_jis_char_width,
4861 .alnum_char = pm_encoding_shift_jis_alnum_char,
4862 .alpha_char = pm_encoding_shift_jis_alpha_char,
4863 .isupper_char = pm_encoding_shift_jis_isupper_char,
4866 [PM_ENCODING_SJIS_KDDI] = {
4867 .name =
"SJIS-KDDI",
4868 .char_width = pm_encoding_shift_jis_char_width,
4869 .alnum_char = pm_encoding_shift_jis_alnum_char,
4870 .alpha_char = pm_encoding_shift_jis_alpha_char,
4871 .isupper_char = pm_encoding_shift_jis_isupper_char,
4874 [PM_ENCODING_SJIS_SOFTBANK] = {
4875 .name =
"SJIS-SoftBank",
4876 .char_width = pm_encoding_shift_jis_char_width,
4877 .alnum_char = pm_encoding_shift_jis_alnum_char,
4878 .alpha_char = pm_encoding_shift_jis_alpha_char,
4879 .isupper_char = pm_encoding_shift_jis_isupper_char,
4882 [PM_ENCODING_STATELESS_ISO_2022_JP] = {
4883 .name =
"stateless-ISO-2022-JP",
4884 .char_width = pm_encoding_emacs_mule_char_width,
4885 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4886 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4887 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4890 [PM_ENCODING_STATELESS_ISO_2022_JP_KDDI] = {
4891 .name =
"stateless-ISO-2022-JP-KDDI",
4892 .char_width = pm_encoding_emacs_mule_char_width,
4893 .alnum_char = pm_encoding_ascii_alnum_char_7bit,
4894 .alpha_char = pm_encoding_ascii_alpha_char_7bit,
4895 .isupper_char = pm_encoding_ascii_isupper_char_7bit,
4898 [PM_ENCODING_TIS_620] = {
4900 .char_width = pm_encoding_single_char_width,
4901 .alnum_char = pm_encoding_tis_620_alnum_char,
4902 .alpha_char = pm_encoding_tis_620_alpha_char,
4903 .isupper_char = pm_encoding_tis_620_isupper_char,
4906 [PM_ENCODING_UTF8_MAC] = {
4914 [PM_ENCODING_UTF8_DOCOMO] = {
4915 .name =
"UTF8-DoCoMo",
4922 [PM_ENCODING_UTF8_KDDI] = {
4923 .name =
"UTF8-KDDI",
4930 [PM_ENCODING_UTF8_SOFTBANK] = {
4931 .name =
"UTF8-SoftBank",
4938 [PM_ENCODING_WINDOWS_1250] = {
4939 .name =
"Windows-1250",
4940 .char_width = pm_encoding_single_char_width,
4941 .alnum_char = pm_encoding_windows_1250_alnum_char,
4942 .alpha_char = pm_encoding_windows_1250_alpha_char,
4943 .isupper_char = pm_encoding_windows_1250_isupper_char,
4946 [PM_ENCODING_WINDOWS_1251] = {
4947 .name =
"Windows-1251",
4948 .char_width = pm_encoding_single_char_width,
4949 .alnum_char = pm_encoding_windows_1251_alnum_char,
4950 .alpha_char = pm_encoding_windows_1251_alpha_char,
4951 .isupper_char = pm_encoding_windows_1251_isupper_char,
4954 [PM_ENCODING_WINDOWS_1252] = {
4955 .name =
"Windows-1252",
4956 .char_width = pm_encoding_single_char_width,
4957 .alnum_char = pm_encoding_windows_1252_alnum_char,
4958 .alpha_char = pm_encoding_windows_1252_alpha_char,
4959 .isupper_char = pm_encoding_windows_1252_isupper_char,
4962 [PM_ENCODING_WINDOWS_1253] = {
4963 .name =
"Windows-1253",
4964 .char_width = pm_encoding_single_char_width,
4965 .alnum_char = pm_encoding_windows_1253_alnum_char,
4966 .alpha_char = pm_encoding_windows_1253_alpha_char,
4967 .isupper_char = pm_encoding_windows_1253_isupper_char,
4970 [PM_ENCODING_WINDOWS_1254] = {
4971 .name =
"Windows-1254",
4972 .char_width = pm_encoding_single_char_width,
4973 .alnum_char = pm_encoding_windows_1254_alnum_char,
4974 .alpha_char = pm_encoding_windows_1254_alpha_char,
4975 .isupper_char = pm_encoding_windows_1254_isupper_char,
4978 [PM_ENCODING_WINDOWS_1255] = {
4979 .name =
"Windows-1255",
4980 .char_width = pm_encoding_single_char_width,
4981 .alnum_char = pm_encoding_windows_1255_alnum_char,
4982 .alpha_char = pm_encoding_windows_1255_alpha_char,
4983 .isupper_char = pm_encoding_windows_1255_isupper_char,
4986 [PM_ENCODING_WINDOWS_1256] = {
4987 .name =
"Windows-1256",
4988 .char_width = pm_encoding_single_char_width,
4989 .alnum_char = pm_encoding_windows_1256_alnum_char,
4990 .alpha_char = pm_encoding_windows_1256_alpha_char,
4991 .isupper_char = pm_encoding_windows_1256_isupper_char,
4994 [PM_ENCODING_WINDOWS_1257] = {
4995 .name =
"Windows-1257",
4996 .char_width = pm_encoding_single_char_width,
4997 .alnum_char = pm_encoding_windows_1257_alnum_char,
4998 .alpha_char = pm_encoding_windows_1257_alpha_char,
4999 .isupper_char = pm_encoding_windows_1257_isupper_char,
5002 [PM_ENCODING_WINDOWS_1258] = {
5003 .name =
"Windows-1258",
5004 .char_width = pm_encoding_single_char_width,
5005 .alnum_char = pm_encoding_windows_1258_alnum_char,
5006 .alpha_char = pm_encoding_windows_1258_alpha_char,
5007 .isupper_char = pm_encoding_windows_1258_isupper_char,
5010 [PM_ENCODING_WINDOWS_874] = {
5011 .name =
"Windows-874",
5012 .char_width = pm_encoding_single_char_width,
5013 .alnum_char = pm_encoding_windows_874_alnum_char,
5014 .alpha_char = pm_encoding_windows_874_alpha_char,
5015 .isupper_char = pm_encoding_windows_874_isupper_char,
5027 size_t width = (size_t) (end - start);
5032 if ((start + 5 <= end) && (
pm_strncasecmp(start, (
const uint8_t *)
"UTF-8", 5) == 0)) {
5033 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5036 if (width == 9 && (
pm_strncasecmp(start + 5, (
const uint8_t *)
"-HFS", 4) == 0)) {
5047 #define ENCODING1(name, encoding) if (width == sizeof(name) - 1 && pm_strncasecmp(start, (const uint8_t *) name, width) == 0) return &pm_encodings[encoding];
5048 #define ENCODING2(name1, name2, encoding) ENCODING1(name1, encoding) ENCODING1(name2, encoding)
5053 ENCODING1(
"ASCII", PM_ENCODING_US_ASCII);
5054 ENCODING1(
"ASCII-8BIT", PM_ENCODING_ASCII_8BIT);
5055 ENCODING1(
"ANSI_X3.4-1968", PM_ENCODING_US_ASCII);
5058 ENCODING1(
"BINARY", PM_ENCODING_ASCII_8BIT);
5059 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5060 ENCODING1(
"Big5", PM_ENCODING_BIG5);
5061 ENCODING2(
"Big5-HKSCS",
"Big5-HKSCS:2008", PM_ENCODING_BIG5_HKSCS);
5062 ENCODING1(
"Big5-UAO", PM_ENCODING_BIG5_UAO);
5066 ENCODING1(
"CP65001", PM_ENCODING_UTF_8);
5067 ENCODING2(
"CP932",
"csWindows31J", PM_ENCODING_WINDOWS_31J);
5068 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5069 ENCODING1(
"CESU-8", PM_ENCODING_CESU_8);
5070 ENCODING1(
"CP437", PM_ENCODING_IBM437);
5071 ENCODING1(
"CP720", PM_ENCODING_IBM720);
5072 ENCODING1(
"CP737", PM_ENCODING_IBM737);
5073 ENCODING1(
"CP775", PM_ENCODING_IBM775);
5074 ENCODING1(
"CP850", PM_ENCODING_CP850);
5075 ENCODING1(
"CP852", PM_ENCODING_CP852);
5076 ENCODING1(
"CP855", PM_ENCODING_CP855);
5077 ENCODING1(
"CP857", PM_ENCODING_IBM857);
5078 ENCODING1(
"CP860", PM_ENCODING_IBM860);
5079 ENCODING1(
"CP861", PM_ENCODING_IBM861);
5080 ENCODING1(
"CP862", PM_ENCODING_IBM862);
5081 ENCODING1(
"CP864", PM_ENCODING_IBM864);
5082 ENCODING1(
"CP865", PM_ENCODING_IBM865);
5083 ENCODING1(
"CP866", PM_ENCODING_IBM866);
5084 ENCODING1(
"CP869", PM_ENCODING_IBM869);
5085 ENCODING1(
"CP874", PM_ENCODING_WINDOWS_874);
5086 ENCODING1(
"CP878", PM_ENCODING_KOI8_R);
5087 ENCODING1(
"CP863", PM_ENCODING_IBM863);
5088 ENCODING1(
"CP936", PM_ENCODING_GBK);
5089 ENCODING1(
"CP949", PM_ENCODING_CP949);
5090 ENCODING1(
"CP950", PM_ENCODING_CP950);
5091 ENCODING1(
"CP951", PM_ENCODING_CP951);
5092 ENCODING1(
"CP1250", PM_ENCODING_WINDOWS_1250);
5093 ENCODING1(
"CP1251", PM_ENCODING_WINDOWS_1251);
5094 ENCODING1(
"CP1252", PM_ENCODING_WINDOWS_1252);
5095 ENCODING1(
"CP1253", PM_ENCODING_WINDOWS_1253);
5096 ENCODING1(
"CP1254", PM_ENCODING_WINDOWS_1254);
5097 ENCODING1(
"CP1255", PM_ENCODING_WINDOWS_1255);
5098 ENCODING1(
"CP1256", PM_ENCODING_WINDOWS_1256);
5099 ENCODING1(
"CP1257", PM_ENCODING_WINDOWS_1257);
5100 ENCODING1(
"CP1258", PM_ENCODING_WINDOWS_1258);
5101 ENCODING1(
"CP51932", PM_ENCODING_CP51932);
5105 ENCODING2(
"EUC-JP",
"eucJP", PM_ENCODING_EUC_JP);
5106 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5107 ENCODING2(
"eucJP-ms",
"euc-jp-ms", PM_ENCODING_EUC_JP_MS);
5108 ENCODING2(
"EUC-JIS-2004",
"EUC-JISX0213", PM_ENCODING_EUC_JIS_2004);
5109 ENCODING2(
"EUC-KR",
"eucKR", PM_ENCODING_EUC_KR);
5110 ENCODING2(
"EUC-CN",
"eucCN", PM_ENCODING_GB2312);
5111 ENCODING2(
"EUC-TW",
"eucTW", PM_ENCODING_EUC_TW);
5112 ENCODING1(
"Emacs-Mule", PM_ENCODING_EMACS_MULE);
5116 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5117 ENCODING1(
"GBK", PM_ENCODING_GBK);
5118 ENCODING1(
"GB12345", PM_ENCODING_GB12345);
5119 ENCODING1(
"GB18030", PM_ENCODING_GB18030);
5120 ENCODING1(
"GB1988", PM_ENCODING_GB1988);
5121 ENCODING1(
"GB2312", PM_ENCODING_GB2312);
5125 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5126 ENCODING1(
"IBM437", PM_ENCODING_IBM437);
5127 ENCODING1(
"IBM720", PM_ENCODING_IBM720);
5128 ENCODING1(
"IBM737", PM_ENCODING_IBM737);
5129 ENCODING1(
"IBM775", PM_ENCODING_IBM775);
5130 ENCODING1(
"IBM850", PM_ENCODING_CP850);
5131 ENCODING1(
"IBM852", PM_ENCODING_IBM852);
5132 ENCODING1(
"IBM855", PM_ENCODING_IBM855);
5133 ENCODING1(
"IBM857", PM_ENCODING_IBM857);
5134 ENCODING1(
"IBM860", PM_ENCODING_IBM860);
5135 ENCODING1(
"IBM861", PM_ENCODING_IBM861);
5136 ENCODING1(
"IBM862", PM_ENCODING_IBM862);
5137 ENCODING1(
"IBM863", PM_ENCODING_IBM863);
5138 ENCODING1(
"IBM864", PM_ENCODING_IBM864);
5139 ENCODING1(
"IBM865", PM_ENCODING_IBM865);
5140 ENCODING1(
"IBM866", PM_ENCODING_IBM866);
5141 ENCODING1(
"IBM869", PM_ENCODING_IBM869);
5142 ENCODING2(
"ISO-8859-1",
"ISO8859-1", PM_ENCODING_ISO_8859_1);
5143 ENCODING2(
"ISO-8859-2",
"ISO8859-2", PM_ENCODING_ISO_8859_2);
5144 ENCODING2(
"ISO-8859-3",
"ISO8859-3", PM_ENCODING_ISO_8859_3);
5145 ENCODING2(
"ISO-8859-4",
"ISO8859-4", PM_ENCODING_ISO_8859_4);
5146 ENCODING2(
"ISO-8859-5",
"ISO8859-5", PM_ENCODING_ISO_8859_5);
5147 ENCODING2(
"ISO-8859-6",
"ISO8859-6", PM_ENCODING_ISO_8859_6);
5148 ENCODING2(
"ISO-8859-7",
"ISO8859-7", PM_ENCODING_ISO_8859_7);
5149 ENCODING2(
"ISO-8859-8",
"ISO8859-8", PM_ENCODING_ISO_8859_8);
5150 ENCODING2(
"ISO-8859-9",
"ISO8859-9", PM_ENCODING_ISO_8859_9);
5151 ENCODING2(
"ISO-8859-10",
"ISO8859-10", PM_ENCODING_ISO_8859_10);
5152 ENCODING2(
"ISO-8859-11",
"ISO8859-11", PM_ENCODING_ISO_8859_11);
5153 ENCODING2(
"ISO-8859-13",
"ISO8859-13", PM_ENCODING_ISO_8859_13);
5154 ENCODING2(
"ISO-8859-14",
"ISO8859-14", PM_ENCODING_ISO_8859_14);
5155 ENCODING2(
"ISO-8859-15",
"ISO8859-15", PM_ENCODING_ISO_8859_15);
5156 ENCODING2(
"ISO-8859-16",
"ISO8859-16", PM_ENCODING_ISO_8859_16);
5160 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5161 ENCODING1(
"KOI8-R", PM_ENCODING_KOI8_R);
5162 ENCODING1(
"KOI8-U", PM_ENCODING_KOI8_U);
5166 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5167 ENCODING1(
"macCentEuro", PM_ENCODING_MAC_CENT_EURO);
5168 ENCODING1(
"macCroatian", PM_ENCODING_MAC_CROATIAN);
5169 ENCODING1(
"macCyrillic", PM_ENCODING_MAC_CYRILLIC);
5170 ENCODING1(
"macGreek", PM_ENCODING_MAC_GREEK);
5171 ENCODING1(
"macIceland", PM_ENCODING_MAC_ICELAND);
5172 ENCODING1(
"MacJapanese", PM_ENCODING_MAC_JAPANESE);
5173 ENCODING1(
"MacJapan", PM_ENCODING_MAC_JAPANESE);
5174 ENCODING1(
"macRoman", PM_ENCODING_MAC_ROMAN);
5175 ENCODING1(
"macRomania", PM_ENCODING_MAC_ROMANIA);
5176 ENCODING1(
"macThai", PM_ENCODING_MAC_THAI);
5177 ENCODING1(
"macTurkish", PM_ENCODING_MAC_TURKISH);
5178 ENCODING1(
"macUkraine", PM_ENCODING_MAC_UKRAINE);
5182 ENCODING1(
"PCK", PM_ENCODING_WINDOWS_31J);
5185 ENCODING1(
"SJIS", PM_ENCODING_WINDOWS_31J);
5186 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5187 ENCODING1(
"Shift_JIS", PM_ENCODING_SHIFT_JIS);
5188 ENCODING1(
"SJIS-DoCoMo", PM_ENCODING_SJIS_DOCOMO);
5189 ENCODING1(
"SJIS-KDDI", PM_ENCODING_SJIS_KDDI);
5190 ENCODING1(
"SJIS-SoftBank", PM_ENCODING_SJIS_SOFTBANK);
5191 ENCODING1(
"stateless-ISO-2022-JP", PM_ENCODING_STATELESS_ISO_2022_JP);
5192 ENCODING1(
"stateless-ISO-2022-JP-KDDI", PM_ENCODING_STATELESS_ISO_2022_JP_KDDI);
5196 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5197 ENCODING1(
"TIS-620", PM_ENCODING_TIS_620);
5201 ENCODING1(
"US-ASCII", PM_ENCODING_US_ASCII);
5202 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5203 ENCODING2(
"UTF8-MAC",
"UTF-8-HFS", PM_ENCODING_UTF8_MAC);
5204 ENCODING1(
"UTF8-DoCoMo", PM_ENCODING_UTF8_DOCOMO);
5205 ENCODING1(
"UTF8-KDDI", PM_ENCODING_UTF8_KDDI);
5206 ENCODING1(
"UTF8-SoftBank", PM_ENCODING_UTF8_SOFTBANK);
5210 ENCODING1(
"Windows-31J", PM_ENCODING_WINDOWS_31J);
5211 #ifndef PRISM_ENCODING_EXCLUDE_FULL
5212 ENCODING1(
"Windows-874", PM_ENCODING_WINDOWS_874);
5213 ENCODING1(
"Windows-1250", PM_ENCODING_WINDOWS_1250);
5214 ENCODING1(
"Windows-1251", PM_ENCODING_WINDOWS_1251);
5215 ENCODING1(
"Windows-1252", PM_ENCODING_WINDOWS_1252);
5216 ENCODING1(
"Windows-1253", PM_ENCODING_WINDOWS_1253);
5217 ENCODING1(
"Windows-1254", PM_ENCODING_WINDOWS_1254);
5218 ENCODING1(
"Windows-1255", PM_ENCODING_WINDOWS_1255);
5219 ENCODING1(
"Windows-1256", PM_ENCODING_WINDOWS_1256);
5220 ENCODING1(
"Windows-1257", PM_ENCODING_WINDOWS_1257);
5221 ENCODING1(
"Windows-1258", PM_ENCODING_WINDOWS_1258);
5225 ENCODING1(
"646", PM_ENCODING_US_ASCII);
VALUE type(ANYARGS)
ANYARGS-ed function type.
int pm_strncasecmp(const uint8_t *string1, const uint8_t *string2, size_t length)
Compare two strings, ignoring case, up to the given length.
#define PRISM_ATTRIBUTE_UNUSED
GCC will warn if you specify a function or parameter that is unused at runtime.
The encoding interface and implementations used by the parser.
#define PRISM_ENCODING_UPPERCASE_BIT
All of the lookup tables use the third bit of each embedded byte to indicate whether the codepoint is...
bool pm_encoding_utf_8_isupper_char(const uint8_t *b, ptrdiff_t n)
Return true if the next character in the UTF-8 encoding if it is an uppercase character.
#define PM_ENCODING_UTF_8_ENTRY
This is the default UTF-8 encoding.
#define PRISM_ENCODING_ALPHABETIC_BIT
All of the lookup tables use the first bit of each embedded byte to indicate whether the codepoint is...
const pm_encoding_t pm_encodings[PM_ENCODING_MAXIMUM]
This is the table of all of the encodings that prism supports.
const uint8_t pm_encoding_unicode_table[256]
This lookup table is referenced in both the UTF-8 encoding file and the parser directly in order to s...
size_t pm_encoding_utf_8_alpha_char(const uint8_t *b, ptrdiff_t n)
Return the size of the next character in the UTF-8 encoding if it is an alphabetical character.
const pm_encoding_t * pm_encoding_find(const uint8_t *start, const uint8_t *end)
Parse the given name of an encoding and return a pointer to the corresponding encoding struct if one ...
size_t pm_encoding_utf_8_char_width(const uint8_t *b, ptrdiff_t n)
Return the size of the next character in the UTF-8 encoding.
#define PRISM_ENCODING_ALPHANUMERIC_BIT
All of the lookup tables use the second bit of each embedded byte to indicate whether the codepoint i...
size_t pm_encoding_utf_8_alnum_char(const uint8_t *b, ptrdiff_t n)
Return the size of the next character in the UTF-8 encoding if it is an alphanumeric character.
This struct defines the functions necessary to implement the encoding interface so we can determine h...
const char * name
The name of the encoding.