ICU-5171 fix iso-2022-cn min bytes per char: 1 not 2
X-SVN-Rev: 19735
This commit is contained in:
parent
48633f914b
commit
8f9047d4ac
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
* Copyright (C) 2000-2005, International Business Machines
|
* Copyright (C) 2000-2006, International Business Machines
|
||||||
* Corporation and others. All Rights Reserved.
|
* Corporation and others. All Rights Reserved.
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
* file name: ucnv2022.c
|
* file name: ucnv2022.c
|
||||||
@ -3288,7 +3288,7 @@ static const UConverterStaticData _ISO2022CNStaticData={
|
|||||||
0,
|
0,
|
||||||
UCNV_IBM,
|
UCNV_IBM,
|
||||||
UCNV_ISO_2022,
|
UCNV_ISO_2022,
|
||||||
2,
|
1,
|
||||||
8, /* max 8 bytes per UChar: 4-byte CNS designator + 2 bytes for SS2/SS3 + DBCS */
|
8, /* max 8 bytes per UChar: 4-byte CNS designator + 2 bytes for SS2/SS3 + DBCS */
|
||||||
{ 0x1a, 0, 0, 0 },
|
{ 0x1a, 0, 0, 0 },
|
||||||
1,
|
1,
|
||||||
|
8
icu4c/source/test/testdata/conversion.txt
vendored
8
icu4c/source/test/testdata/conversion.txt
vendored
@ -445,6 +445,14 @@ conversion:table(nofallback) {
|
|||||||
fromUnicode {
|
fromUnicode {
|
||||||
Headers { "charset", "unicode", "bytes", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidUChars" }
|
Headers { "charset", "unicode", "bytes", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidUChars" }
|
||||||
Cases {
|
Cases {
|
||||||
|
// ISO 2022-CN: test a single-byte subchar, j5171
|
||||||
|
{
|
||||||
|
"iso-2022-cn",
|
||||||
|
"a\x1bc", // Unicode ESC must not occur as a character
|
||||||
|
:bin{ 612163 },
|
||||||
|
:intvector{ 0,1,2 },
|
||||||
|
:int{1}, :int{0}, "", "?\x00\x21", ""
|
||||||
|
}
|
||||||
// UTF-16/32: do not output a BOM if there is no data at all
|
// UTF-16/32: do not output a BOM if there is no data at all
|
||||||
{
|
{
|
||||||
"UTF-16",
|
"UTF-16",
|
||||||
|
Loading…
Reference in New Issue
Block a user