Browse Source

encoding.c: Use 16 bits for the codepage encodings as they are all in the Basic Multilingual Plane.

master
Reece H. Dunn 8 years ago
parent
commit
27ff1f6b69
1 changed files with 18 additions and 18 deletions
  1. 18
    18
      src/libespeak-ng/encoding.c

+ 18
- 18
src/libespeak-ng/encoding.c View File

@@ -156,12 +156,12 @@ struct espeak_ng_TEXT_DECODER_
const char *end;

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.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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -182,7 +182,7 @@ static const uint32_t ISO_8859_2[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -203,7 +203,7 @@ static const uint32_t ISO_8859_3[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -224,7 +224,7 @@ static const uint32_t ISO_8859_4[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -245,7 +245,7 @@ static const uint32_t ISO_8859_5[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -266,7 +266,7 @@ static const uint32_t ISO_8859_6[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -287,7 +287,7 @@ static const uint32_t ISO_8859_7[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -308,7 +308,7 @@ static const uint32_t ISO_8859_8[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -329,7 +329,7 @@ static const uint32_t ISO_8859_9[0x80] = {

// Reference: http://www.iana.org/go/rfc1345
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -349,7 +349,7 @@ static const uint32_t ISO_8859_10[0x80] = {
};

// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -369,7 +369,7 @@ static const uint32_t ISO_8859_11[0x80] = {
};

// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -389,7 +389,7 @@ static const uint32_t ISO_8859_13[0x80] = {
};

// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -409,7 +409,7 @@ static const uint32_t ISO_8859_14[0x80] = {
};

// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -429,7 +429,7 @@ static const uint32_t ISO_8859_15[0x80] = {
};

// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -450,7 +450,7 @@ static const uint32_t ISO_8859_16[0x80] = {

// Reference: http://www.iana.org/go/rfc1489
// 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
0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, // 88
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, // 90
@@ -470,7 +470,7 @@ static const uint32_t KOI8_R[0x80] = {
};

// 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, // 88
0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 90
@@ -514,7 +514,7 @@ string_decoder_getc_codepage(espeak_ng_TEXT_DECODER *decoder)
typedef struct
{
uint32_t (*get)(espeak_ng_TEXT_DECODER *decoder);
const uint32_t *codepage;
const uint16_t *codepage;
} encoding_t;

static const encoding_t string_decoders[] = {

Loading…
Cancel
Save