+ // Test bug 6071 (1:2 Unicode:charset SBCS mapping).
+ {
+ "*test1bmp",
+ "e@t",
+ :bin{ 05000709 },
+ :intvector{ 0,1,2,2 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ // improve coverage of ISO-2022-JP converter with hardcoded JIS X 0201 and
+ // using the Shift-JIS table for JIS X 0208 (ticket #5797)
+ {
+ "ISO-2022-JP",
+ "\u203e\xa5\u4e00\ufa10\u6f3e\u0391",
+ :bin{ 1b284a7e5c1b2442306c222e5f2126211b2842 },
+ :intvector{ 0,0,0,0,1,2,2,2,2,2,3,3,4,4,5,5,5,5,5 },
+ :int{1}, :int{0}, "", "?=\u3013", "" // U+3013 Geta Mark converts to 222e
+ }
+ // Verify that mappings that would result in byte values outside 20..7F (for SBCS)
+ // or 21..7E (for DBCS) are not used.
+ // ibm-9005_X110-2007.ucm (ISO 8859-7, <ESC>.F=1b2e46):
+ // <U009F> \x9F |0 (also in ISO 8859-1)
+ // <U0387> \xB7 |1
+ // windows-949-2000 (KSC_5601, <ESC>$(C=1b242843):
+ // <UC829> \xA0\xA1 |0
+ // <UD4FE> \xC0\x41 |0
+ // <UD79D> \xC8\xFE |0
+ {
+ "JIS8", // =ISO_2022,locale=ja,version=4
+ "\u009f\u0387\uc829\ud4fe\ud79d",
+ :bin{ 1a1b2e461b4e371a1a1b242843487e1b2842 },
+ :intvector{ 0,1,1,1,1,1,1,2,3,4,4,4,4,4,4,4,4,4 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ // Ticket 5483: ISO 2022 converter incorrectly using fallback mapping
+ // Verify that a roundtrip mapping is used even when a fallback mapping is
+ // available in the current state.
+ // U+FF61 is handled in code
+ // jisx-208.ucm (<ESC>$B=1b2442):
+ // <U30FE> \x21\x34 |0
+ // <UFF5D> \x21\x51 |0 and
+ // ibm-897_P100-1995.ucm (JIS X 0201, <ESC>(J=1b284a):
+ // <UFF5D> \x7D |1
+ // ibm-9005_X110-2007.ucm (ISO 8859-7, <ESC>.F=1b2e46):
+ // <U03D5> \xF6 |1
+ // <U2015> \xAF |0
+ // <UFF5D> \x7D |1 (not legal for ISO 2022)
+ // windows-949-2000 (KSC_5601, <ESC>$(C=1b242843):
+ // <UAC00> \xB0\xA1 |0
+ // <UFF5D> \xA3\xFD |0
+ // <U223C> \xA1\xAD |0 (in extension table)
+ {
+ "JIS8", // =ISO_2022,locale=ja,version=4
+ "a\uff61\u03d5\uff5d\uac00\u223c\uff5d\u30fe\uff5d", // Make it switch to ISO-8859-7, KSC 5601 and JIS X 0208.
+ :bin{ 61a11b2e461b4e761b244221511b2428433021212d237d1b2442213421511b2842 },
+ :intvector{ 0,1,2,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,5,5,6,6,7,7,7,7,7,8,8,8,8,8 },
+ :int{1}, :int{1}, "", "?", ""
+ }
+ // Code coverage for UTF-8->SBCS conversion (ucnv_convertEx()).
+ // Test code path for non-roundtripping ASCII characters
+ // (try EBCDIC SBCS, and IBM PC SBCS with control code rotation).
+ {
+ "ibm-37",
+ "a\x85c",
+ :bin{ 811583 },
+ :intvector{ 0,1,2 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ {
+ "ibm-850",
+ "a\x1ac",
+ :bin{ 617f63 },
+ :intvector{ 0,1,2 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ // Code coverage for UTF-8->DBCS conversion (ucnv_convertEx()).
+ // Test code path for non-roundtripping ASCII characters
+ // (try IBM PC DBCS with control code rotation).
+ {
+ "ibm-943",
+ "a\x1ac\u30a1\x7ff",
+ :bin{ 617f6383401c66 },
+ :intvector{ 0,1,2,3,3,4,5 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ // SCSU regression test.