[ICU-86] new converter names UTF16_PlatformEndian & UTF16_OppositeEndian to have correct convrtrs.txt on all platforms

X-Commit-URL: https://ssl.icu-project.org/trac/changeset/145
This commit is contained in:
Markus Scherer 1999-10-29 20:55:42 +00:00
parent 6784aec755
commit 1d11946125
4 changed files with 27 additions and 15 deletions

View file

@ -5,11 +5,10 @@
# Algorithmic: DO NOT CHANGE LEFT COLUMN OF ALGORITHMIC CONVERTERS
UTF8 utf8 utf-8 ibm-1208 utf_8 ibm1208 cp1208
# If ICU is run on the intel platforms, NT, Linux etc., be sure to update the UTF16 entry with the following two lines:
# UTF16_BigEndian utf-16le utf-16 ibm-1200 ibm1200 cp1200 iso-10646-ucs-2 ucs-2
# UTF16_LittleEndian utf-16be
UTF16_BigEndian utf-16be utf-16 ibm-1200 ibm1200 cp1200 iso-10646-ucs-2 ucs-2
UTF16_BigEndian utf-16be
UTF16_LittleEndian utf-16le
UTF16_PlatformEndian utf16 utf-16 ibm-1200 ibm1200 cp1200 iso-10646-ucs-2 ucs-2
UTF16_OppositeEndian
LATIN_1 iso-8859-1 iso_8859-1 ibm-819 ibm819 cp819 latin1 latin-1 ascii ascii-7 us-ascii 8859-1 csisolatin1 iso-ir-100 iso_8859-1:1978
ISO_2022 iso-2022 2022 cp2022 iso2022 iso_2022

View file

@ -40,11 +40,12 @@ static const char *algorithmicConverterNames[] = {
"UTF8",
"UTF16_BigEndian",
"UTF16_LittleEndian",
"UTF16_PlatformEndian",
"UTF16_OppositeEndian",
"ISO_2022",
"JIS",
"EUC",
"GB",
"ISO_2022",
""
};
@ -373,6 +374,18 @@ UConverterType
return UCNV_GB;
else if (icu_strcmp (realName, "ISO_2022") == 0)
return UCNV_ISO_2022;
else if (icu_strcmp (realName, "UTF16_PlatformEndian") == 0)
# if U_IS_BIG_ENDIAN
return UCNV_UTF16_BigEndian;
# else
return UCNV_UTF16_LittleEndian;
# endif
else if (icu_strcmp (realName, "UTF16_OppositeEndian") == 0)
# if U_IS_BIG_ENDIAN
return UCNV_UTF16_LittleEndian;
# else
return UCNV_UTF16_BigEndian;
# endif
else
return UCNV_UNSUPPORTED_CONVERTER;
}
@ -767,6 +780,7 @@ void
break;
}
case UCNV_UTF16_LittleEndian:
{
myConverter->sharedData->minBytesPerChar = 2;

View file

@ -207,8 +207,8 @@ const char* escSeqStateTable_Result_2022[MAX_STATES_2022] = {
NULL ,NULL ,NULL ,NULL ,"latin1" ,"latin1" ,"latin1" ,"ibm-865" ,"ibm-865" ,"ibm-865"
,"ibm-865" ,"ibm-865" ,"ibm-865" ,"ibm-895" ,"ibm-943" ,"latin1" ,"latin1" ,NULL ,"ibm-955" ,"ibm-367"
,"ibm-952" ,NULL ,"UTF8" ,NULL ,"ibm-955" ,"bm-367" ,"ibm-952" ,"ibm-949" ,"ibm-953" ,"ibm-1383"
,"ibm-952" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"UTF16" ,"UTF16" ,"UTF16"
,"UTF16" ,"UTF16" ,"UTF16" ,NULL ,"latin1" ,"ibm-912" ,"ibm-913" ,"ibm-914" ,"ibm-813" ,"ibm-1089"
,"ibm-952" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"ibm-964" ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian"
,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,"UTF16_PlatformEndian" ,NULL ,"latin1" ,"ibm-912" ,"ibm-913" ,"ibm-914" ,"ibm-813" ,"ibm-1089"
,"ibm-920" ,"ibm-915" ,"ibm-915" ,"latin1"};
UCNV_TableStates_2022 escSeqStateTable_Value_2022[MAX_STATES_2022] = {
@ -2110,8 +2110,8 @@ void T_UConverter_fromUnicode_UTF8 (UConverter * _this,
int8_t targetCharByteNum = 0;
UChar mySourceChar = 0x0000;
uint32_t ch;
int16_t bytesToWrite = 0;
uint32_t ch2, i;
int16_t i, bytesToWrite = 0;
uint32_t ch2;
char temp[4];
if (_this->fromUnicodeStatus)
@ -2222,8 +2222,8 @@ void T_UConverter_fromUnicode_UTF8_OFFSETS_LOGIC (UConverter * _this,
int8_t targetCharByteNum = 0;
UChar mySourceChar = 0x0000;
uint32_t ch;
int16_t bytesToWrite = 0;
uint32_t ch2, i;
int16_t i, bytesToWrite = 0;
uint32_t ch2;
char temp[4];
if (_this->fromUnicodeStatus)

View file

@ -5,11 +5,10 @@
# Algorithmic: DO NOT CHANGE LEFT COLUMN OF ALGORITHMIC CONVERTERS
UTF8 utf8 utf-8 ibm-1208 utf_8 ibm1208 cp1208
# If ICU is run on the intel platforms, NT, Linux etc., be sure to update the UTF16 entry with the following two lines:
# UTF16_BigEndian utf-16le utf-16 ibm-1200 ibm1200 cp1200 iso-10646-ucs-2 ucs-2
# UTF16_LittleEndian utf-16be
UTF16_BigEndian utf-16be utf-16 ibm-1200 ibm1200 cp1200 iso-10646-ucs-2 ucs-2
UTF16_BigEndian utf-16be
UTF16_LittleEndian utf-16le
UTF16_PlatformEndian utf16 utf-16 ibm-1200 ibm1200 cp1200 iso-10646-ucs-2 ucs-2
UTF16_OppositeEndian
LATIN_1 iso-8859-1 iso_8859-1 ibm-819 ibm819 cp819 latin1 latin-1 ascii ascii-7 us-ascii 8859-1 csisolatin1 iso-ir-100 iso_8859-1:1978
ISO_2022 iso-2022 2022 cp2022 iso2022 iso_2022