| const char *end; | const char *end; | ||||
| uint32_t (*get)(espeak_ng_TEXT_DECODER *decoder); | uint32_t (*get)(espeak_ng_TEXT_DECODER *decoder); | ||||
| const uint32_t *codepage; | |||||
| const uint16_t *codepage; | |||||
| }; | }; | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT | ||||
| static const uint32_t ISO_8859_2[0x80] = { | |||||
| static const uint16_t ISO_8859_2[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-3.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-3.TXT | ||||
| static const uint32_t ISO_8859_3[0x80] = { | |||||
| static const uint16_t ISO_8859_3[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-4.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-4.TXT | ||||
| static const uint32_t ISO_8859_4[0x80] = { | |||||
| static const uint16_t ISO_8859_4[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT | ||||
| static const uint32_t ISO_8859_5[0x80] = { | |||||
| static const uint16_t ISO_8859_5[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-6.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-6.TXT | ||||
| static const uint32_t ISO_8859_6[0x80] = { | |||||
| static const uint16_t ISO_8859_6[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT | ||||
| static const uint32_t ISO_8859_7[0x80] = { | |||||
| static const uint16_t ISO_8859_7[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT | ||||
| static const uint32_t ISO_8859_8[0x80] = { | |||||
| static const uint16_t ISO_8859_8[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-9.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-9.TXT | ||||
| static const uint32_t ISO_8859_9[0x80] = { | |||||
| static const uint16_t ISO_8859_9[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1345 | // Reference: http://www.iana.org/go/rfc1345 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-10.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-10.TXT | ||||
| static const uint32_t ISO_8859_10[0x80] = { | |||||
| static const uint16_t ISO_8859_10[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| }; | }; | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-11.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-11.TXT | ||||
| static const uint32_t ISO_8859_11[0x80] = { | |||||
| static const uint16_t ISO_8859_11[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| }; | }; | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-13.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-13.TXT | ||||
| static const uint32_t ISO_8859_13[0x80] = { | |||||
| static const uint16_t ISO_8859_13[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| }; | }; | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-14.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-14.TXT | ||||
| static const uint32_t ISO_8859_14[0x80] = { | |||||
| static const uint16_t ISO_8859_14[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| }; | }; | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-15.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-15.TXT | ||||
| static const uint32_t ISO_8859_15[0x80] = { | |||||
| static const uint16_t ISO_8859_15[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| }; | }; | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT | ||||
| static const uint32_t ISO_8859_16[0x80] = { | |||||
| static const uint16_t ISO_8859_16[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| // Reference: http://www.iana.org/go/rfc1489 | // Reference: http://www.iana.org/go/rfc1489 | ||||
| // Reference: http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT | // Reference: http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT | ||||
| static const uint32_t KOI8_R[0x80] = { | |||||
| static const uint16_t KOI8_R[0x80] = { | |||||
| 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, // 80 | ||||
| 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88 | ||||
| 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90 | ||||
| }; | }; | ||||
| // Reference: http://varamozhi.sourceforge.net/iscii91.pdf | // Reference: http://varamozhi.sourceforge.net/iscii91.pdf | ||||
| static const uint32_t ISCII[0x80] = { | |||||
| static const uint16_t ISCII[0x80] = { | |||||
| 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 80 | 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 80 | ||||
| 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 88 | 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 88 | ||||
| 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 90 | 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 90 | ||||
| typedef struct | typedef struct | ||||
| { | { | ||||
| uint32_t (*get)(espeak_ng_TEXT_DECODER *decoder); | uint32_t (*get)(espeak_ng_TEXT_DECODER *decoder); | ||||
| const uint32_t *codepage; | |||||
| const uint16_t *codepage; | |||||
| } encoding_t; | } encoding_t; | ||||
| static const encoding_t string_decoders[] = { | static const encoding_t string_decoders[] = { |