charset.c (speech_tools-2.4-release) | : | charset.c (speech_tools-2.5.0-release) | ||
---|---|---|---|---|
skipping to change at line 236 | skipping to change at line 236 | |||
{"UCS-2", CE_ISO_10646_UCS_2B}, | {"UCS-2", CE_ISO_10646_UCS_2B}, | |||
}; | }; | |||
const int CE_alias_count = | const int CE_alias_count = | |||
sizeof(CharacterEncodingAlias)/sizeof(CharacterEncodingAlias[0]); | sizeof(CharacterEncodingAlias)/sizeof(CharacterEncodingAlias[0]); | |||
CharacterEncoding InternalCharacterEncoding; | CharacterEncoding InternalCharacterEncoding; | |||
void init_charset(void) | void init_charset(void) | |||
{ | { | |||
int i, j; | int i, j; | |||
union {char b[2]; short s;} bytes; | ||||
/* Determine internal encoding */ | /* Determine internal encoding */ | |||
bytes.s = 1; | ||||
#if CHAR_SIZE == 8 | #if CHAR_SIZE == 8 | |||
InternalCharacterEncoding = CE_unspecified_ascii_superset; | InternalCharacterEncoding = CE_unspecified_ascii_superset; | |||
#else | #else | |||
union {char b[2]; short s;} bytes; | ||||
bytes.s = 1; | ||||
InternalCharacterEncoding = (bytes.b[0] == 0) ? CE_UTF_16B : CE_UTF_16L; | InternalCharacterEncoding = (bytes.b[0] == 0) ? CE_UTF_16B : CE_UTF_16L; | |||
#endif | #endif | |||
/* Make ISO-Latin-N tables */ | /* Make ISO-Latin-N tables */ | |||
for(i=0; i<8; i++) | for(i=0; i<8; i++) | |||
{ | { | |||
int max = 0x9f; | int max = 0x9f; | |||
for(j=0; j<0xa0; j++) | for(j=0; j<0xa0; j++) | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |