ICU-7926 Add ISO-2022-CN-CNS to ICU4C.

X-SVN-Rev: 28587
This commit is contained in:
Michael Ow 2010-09-08 23:18:15 +00:00
parent 76bff5bdd3
commit dda7ae77c6
3 changed files with 20 additions and 5 deletions

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2000-2009, International Business Machines
* Copyright (C) 2000-2010, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv2022.c
@ -565,11 +565,15 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){
cnv->sharedData=(UConverterSharedData*)&_ISO2022CNData;
uprv_strcpy(myConverterData->locale,"cn");
if (version==1){
(void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=zh,version=1");
}else{
if (version==0){
myConverterData->version = 0;
(void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=zh,version=0");
}else if (version==1){
myConverterData->version = 1;
(void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=zh,version=1");
}else {
myConverterData->version = 2;
(void)uprv_strcpy(myConverterData->name,"ISO_2022,locale=zh,version=2");
}
}
else{
@ -2972,7 +2976,7 @@ getTrail:
}
choiceCount = 2;
} else {
} else if (converterData->version == 1) {
/* ISO-2022-CN-EXT */
/* try one of the other converters */
@ -2992,6 +2996,9 @@ getTrail:
}
choiceCount = 3;
} else {
choices[0] = (int8_t)CNS_11643_1;
choices[1] = (int8_t)GB2312_1;
}
}

View file

@ -954,6 +954,7 @@ ISO_2022,locale=ko,version=0 ISO-2022-KR { IANA* MIME* JAVA* } csISO2022KR {
ISO_2022,locale=ko,version=1 ibm-25546 { IBM* }
ISO_2022,locale=zh,version=0 ISO-2022-CN { IANA* JAVA* } csISO2022CN { JAVA } x-ISO-2022-CN-GB { JAVA }
ISO_2022,locale=zh,version=1 ISO-2022-CN-EXT { IANA* }
ISO_2022,locale=zh,version=2 ISO-2022-CN-CNS x-ISO-2022-CN-CNS { JAVA }
HZ HZ-GB-2312 { IANA* }
ISCII,version=0 x-ISCII91 { JAVA } x-iscii-de { WINDOWS } windows-57002 { WINDOWS* } iscii-dev ibm-4902 { IBM* } # ibm-806 contains non-standard box drawing symbols.

View file

@ -148,6 +148,13 @@ conversion:table(nofallback) {
:intvector{ 0,5,7,9,9,9,9,10,12,12,12,12,12,12,12,12,14,17 },
:int{1}, :int{0}, "", "&C", :bin{""}
}
{
"ISO-2022-CN-CNS",
:bin{ 411b2429470e21702541256f0f },
"A\u00a7\u03c4\u02c7",
:intvector{ 0,6,8,10 },
:int{1}, :int{0}, "", "&C", :bin{""}
}
{
"HZ",
:bin{ 417e7b4141af4142affe41437e7d5a },