//*******************************************************************************
//
-// Copyright (C) 2003-2008, International Business Machines
+// Copyright (C) 2003-2013, International Business Machines
// Corporation and others. All Rights Reserved.
//
// file name: conversion.txt
"Run intltest conversion\n"
"Charset names starting with '*' are for testdata names.\n"
+ "Charset names starting with '+' are for charsets currently not supported in ICU4J.\n"
"ICU callbacks are specified as strings with pairs of characters, each optional.\n"
"Callback function - '?'=Sub '0'=Skip '.'=Stop '&'=Escape\n"
toUnicode {
Headers { "charset", "bytes", "unicode", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidChars" }
Cases {
+ // Test ticket 6789: implement Java-compatible Unicode, UnicodeBig and UnicodeLittle converters
+ // For details about these encodings see convrtrs.txt.
+ // Standard UTF-16
+ { "UTF-16", :bin{ 00610062 }, "ab", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UTF-16", :bin{ feff0061 }, "a", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UTF-16", :bin{ fffe0061 }, "\u6100", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ // Java "Unicode" requires a BOM
+ { "+UTF-16,version=1", :bin{ 00610062 }, "\\x00\\x61b", :intvector{ 0,0,0,0,0,0,0,0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "+UTF-16,version=1", :bin{ feff0061 }, "a", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "+UTF-16,version=1", :bin{ fffe0061 }, "\u6100", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ // Standard UTF-16BE
+ { "UTF-16BE", :bin{ 00610062 }, "ab", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UTF-16BE", :bin{ feff0061 }, "\ufeffa", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UTF-16BE", :bin{ fffe0061 }, "\ufffea", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ // Java "UnicodeBig" requires a BE BOM or no BOM; it consumes the BE BOM
+ { "UTF-16BE,version=1",:bin{ 00610062 }, "ab", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UnicodeBig", :bin{ feff0061 }, "a", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UnicodeBig", :bin{ fffe0061 }, "\\xFF\\xFEa", :intvector{ 0,0,0,0,0,0,0,0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ // Standard UTF-16LE
+ { "UTF-16LE", :bin{ 61006200 }, "ab", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UTF-16LE", :bin{ fffe6100 }, "\ufeffa", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UTF-16LE", :bin{ feff6100 }, "\ufffea", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ // Java "UnicodeLittle" requires an LE BOM or no BOM; it consumes the LE BOM
+ { "UTF-16LE,version=1",:bin{ 61006200 }, "ab", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "UnicodeLittle", :bin{ fffe6100 }, "a", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "x-UTF-16LE-BOM", :bin{ feff6100 }, "\\xFE\\xFFa", :intvector{ 0,0,0,0,0,0,0,0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+
+ // Test ticket 7704: implement Java-compatible "UTF-16" converter.
+ // Same as standard UTF-16 but fromUnicode always writes big-endian byte stream.
+ { "+UTF-16,version=2", :bin{ 00610062 }, "ab", :intvector{ 0,2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "+UTF-16,version=2", :bin{ feff0061 }, "a", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+ { "+UTF-16,version=2", :bin{ fffe0061 }, "\u6100", :intvector{ 2 }, :int{1}, :int{0}, "", "&C", :bin{""} }
+
// Test ticket 5691: consistent illegal sequences
// The following test cases are for illegal character byte sequences.
//
}
{
"gb18030",
- :bin{ 618130fc318130fc8181303c3e813cfc817a },
- "a\u05ed\\x810\u9f07\\x810<>\\x81<\u9f07z",
- :intvector{ 0,1,5,5,5,5,6,7,9,9,9,9,10,11,12,13,13,13,13,14,15,17 },
+ :bin{ 618130fc318130fc8181303c3e813cfc817afe90a8bc },
+ "a\u05ed\\x810\u9f07\\x810<>\\x81<\u9f07z\ue854\u1e3f",
+ :intvector{ 0,1,5,5,5,5,6,7,9,9,9,9,10,11,12,13,13,13,13,14,15,17,18,20 },
:int{1}, :int{0}, "", "&C", :bin{""}
}
{
: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 },
:intvector{ 0,1,1,1,1,2,3,8,11,13,14,14,14,14,15,16 },
:int{1}, :int{0}, "", "&C", :bin{""}
}
+ /*
+ * ICU 4.4 (ticket #7314) removes mappings for CNS 11643 planes 3..7
{
"ISO-2022-CN-EXT",
:bin{ 4f1b4f4f1b242b494f1b4f4f4f4f1b204f },
:intvector{ 0,1,1,1,1,2,3,8,11,13,14,14,14,14,15,16 },
:int{1}, :int{0}, "", "&C", :bin{""}
}
+ */
// Test ticket 5691: HZ with illegal tilde sequences.
{
"HZ",
:bin{ 1b2429410e4141 }, "\u4eae", :intvector{ 5 },
:int{1}, :int{1}, "", ".", :bin{""}
}
+ /*
+ * ICU 4.4 (ticket #7314) removes mappings for CNS 11643 planes 3..7
// ISO-2022-CN-EXT with all subcharsets and shifts and with supplementary code points
{
"ISO-2022-CN-EXT",
:intvector{ 9, 15, 19, 29, 33, 33, 35 },
:int{1}, :int{1}, "", ".", :bin{""}
}
+ */
// illegal and unsupported escape sequences
// SS2 without designator: illegal
:int{1}, :int{0}, "", "?", :bin{""}
}
+ // test mapping to sequence of multiple Unicode characters which includes nonBMP (ticket #9235)
+ {
+ "*test3",
+ :bin{ 05070001020e050501020c06 },
+ "\x05\U00101234\U00050005\u00c4\u00c4\U00101234\x05\x06",
+ :intvector{ 0, 1, 1, 1, 1, 7, 7, 7, 7, 7, 11 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+
// normal conversions
{
"UTF-16LE",
:intvector{ 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6 },
:int{1}, :int{0}, "", "&", :bin{""}
}
+ {
+ "LMBCS",
+ :bin{ 61012981a00f270f91140a7414f60214d84d14dc561088a0 },
+ "\u0061\u2013\u00fc\u00e1\u0007\u0091\u0a74\u0200\ud84d\udc56\u5516",
+ :intvector{ 0, 1, 3, 4, 5, 7, 9, 12, 15, 18, 21 },
+ :int{1}, :int{0}, "", ".", :bin{""}
+ }
// IMAP-mailbox-name with SUB
// a<DEL> a&AB~ a&AB\x0c a&AB- a&AB. a&.
{ "UTF-8", :bin{ 61F48FBFBF }, "a\U0010FFFF", :intvector{ 0, 1, 1 }, :int{1}, :int{0}, "", "", :bin{""} }
// Headers { "charset", "bytes", "unicode", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidChars" }
{
- "iscii",
+ "iscii-dev",
:bin{ EF4BC0E9BFE9E8D80AEF4AC0D4BFD4E8D80AEF4838B30AEF4939B30AEF4A3AB30AEF4B3BB30A},
- "\u0A22\u0A3C\u0A5C\u0A4D\u0A39\u000A" /* Gurmukhi test */
- "\u0AA2\u0AB5\u0AA1\u0AB5\u0ACD\u0AB9\u000A" /* Gujarati test */
- "\u0038\u0C95\u000A" /* Kannada test */
- "\u0039\u0D15\u000A" /* Malayalam test */
- "\u003A\u0A95\u000A" /* Gujarati test */
- "\u003B\u0A15\u000A" /* Punjabi test */,
- :intvector { 2, 3, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 31, 32, 35, 36, 37 },
- :int{1}, :int{0}, "", "", :bin{ "" }
+ "\u0A5C\u0A4D\u0A39\u0A5C\u0A4D\u0A39\u000A" /* Gurmukhi test */
+ "\u0AA2\u0AB5\u0AA1\u0AB5\u0ACD\u0AB9\u000A" /* Gujarati test */
+ "\u0038\u0C95\u000A" /* Kannada test */
+ "\u0039\u0D15\u000A" /* Malayalam test */
+ "\u003A\u0A95\u000A" /* Gujarati test */
+ "\u003B\u0A15\u000A" /* Punjabi test */,
+ :intvector { 2, 2, 2, 4, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 31, 32, 35, 36, 37 },
+ :int{1}, :int{0}, "", "", :bin{ "" }
}
{
"iscii-gur",
:bin{3BB30AC0E9BFE9E8D80AEF43C0E9BFE9E8D80A3BB30AEF403BB30A},
"\u003b\u0a15\u000a" /* Easy characters */
- "\u0a22\u0a3c\u0a5c\u0a4d\u0a39\u000a" /* Gurmukhi test */
+ "\u0a5c\u0a4d\u0a39\u0a5c\u0a4d\u0a39\u000a" /* Gurmukhi test */
"\u09dd\u09dc\u09cd\u09b9\u000a" /* Switch script: to Bengali*/
"\u003b\u0a15\u000a" /* Easy characters - new line" so should default!*/
"\u003b\u0a15\u000a", /* Back to Gurmukhi*/
- :intvector { 0, 1, 2, 3, 4, 6, 7, 8, 9, 13, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26 },
+ :intvector { 0, 1, 2, 3, 3, 3, 5, 7, 8, 9, 13, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26 },
:int{1}, :int{0}, "", "", :bin{ "" }
}
+ // Test Gurmukhi (Bindi Tippi and Consonant Cluster)
+ {
+ "iscii-gur",
+ :bin{EF4BB3A2A2B3E8B3C0E9BFE9E8D8},
+ "\u0a15\u0a70\u0a02\u0a71\u0a15\u0a5c\u0a4d\u0a39\u0a5c\u0a4d\u0a39",
+ :intvector { 2, 3, 4, 5, 5, 8, 8, 8, 10, 12, 13 },
+ :int{1}, :int{0}, "", ".", :bin{ "" }
+ }
{ // Verify Supplementary support
"Big5-HKSCS",
:bin{ fcfcfcfd },
:intvector{ 0, 4, 8, 12 },
:int{1}, :int{0}, "", "?", :bin{""}
}
+ {
+ "x11-compound-text",
+ :bin{ 1b242944b5ac1b2d41a5e31b2d43d5f51b2d4dd01b2d41411b2d43bc1b2d42ff1b2d54df1b2d44c0b31b2d46b41b2d47b01b2d48e01b2d4ca1 },
+ "\u54A1\u00A5\u00E3\u0120\u0121\u011E\u0041\u0135\u02D9\u0E3F\u0100\u0157\u0384\u0660\u05D0\u0401",
+ :intvector{ },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
// Improve coverage of ISCII
{
"iscii-bng",
:intvector{ 4, 6 },
:int{1}, :int{0}, "", ".", :bin{""}
}
+
+ // Improve Code Coverage for BOCU-1
+ {
+ "BOCU-1",
+ :bin{ 91fbc555fd6349 },
+ "\u0041\ud841\ud888\udc81",
+ :intvector{ 0, 1, 4, 4 },
+ :int{1}, :int{0}, "", ".", :bin{""}
+ }
+ {
+ "BOCU-1",
+ :bin{ fbeda44ff0fe189bb821f05926 },
+ "\ufe88\ufe70\udbff\udfff\u0061",
+ :intvector{},
+ :int{1}, :int{0}, "", ".", :bin{""}
+ }
+ {
+ "BOCU-1",
+ :bin{ 5b4bccf9 },
+ "\u000b",
+ :intvector{},
+ :int{1}, :int{0}, "", "0", :bin{""}
+ }
+ {
+ "BOCU-1",
+ :bin{ fe0053c6 },
+ "\u0003\u0076",
+ :intvector{},
+ :int{1}, :int{0}, "", "0", :bin{""}
+ }
+
+ //Improve code coverage for SCSU
+ {
+ "SCSU",
+ :bin{ 0fd899dc7fd888dc99e041424361 },
+ "\ud899\udc7f\ud888\udc99\u0041\u0042\u0043\u0061",
+ :intvector{},
+ :int{1}, :int{0}, "", "0", :bin{""}
+ }
+ {
+ "SCSU",
+ :bin{ 41df1281035f10df1b03df1c88800bbfffff },
+ "\u0041\u00df\u0401\u015f\u00df\u01df\uf000\udbff\udfff",
+ :intvector{},
+ :int{1}, :int{0}, "", ".", :bin{""}
+ }
+ {
+ "SCSU",
+ :bin{ 1b9a1b541bb2411bfd1b0041 },
+ "",
+ :intvector{},
+ :int{1}, :int{0}, "", ".", :bin{""}
+ }
+ {
+ "SCSU",
+ :bin{ 0f6441b413a733f2 },
+ "\u6441\ub413\ua733",
+ :intvector{},
+ :int{1}, :int{0}, "illegal", ".", :bin{ f2 }
+ }
+
+ //Improve code coverage for MBCS
+ {
+ "*test5",
+ :bin{ 0506 },
+ "\ufffd\x06",
+ :intvector{},
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ {
+ "ibm-1390,swaplfnl",
+ :bin{ 430e4395ecc140400fc1e115 },
+ "\uff63\u30C8\u30C8\u309A\u3000\x41\u20ac\x0a",
+ :intvector{ 0, 2, 4, 4, 6, 9, 10, 11 },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ /*
+ * ICU 4.4 (ticket #7314) removes mappings for CNS 11643 planes 3..7
+ {
+ "ISO-2022-CN-EXT",
+ :bin{ 1b242b4d1b4f66791b242b4d1b4f216a },
+ "\u3667",
+ :intvector{ 14 },
+ :int{1}, :int{0}, "", "0", :bin{""}
+ }
+ */
+ {
+ "*test1bmp",
+ :bin{ 060a05 },
+ "\u0066\ufffd\u0065",
+ :intvector{ 0, 2, 2 },
+ :int{0}, :int{1}, "", "?", :bin{""}
+ }
+ {
+ "*test1bmp",
+ :bin{ 060708 },
+ "\u0066",
+ :intvector{},
+ :int{1}, :int{0}, "invalid", ".", :bin{ 07 }
+ }
+ {
+ "*test5",
+ :bin{ 010304 },
+ "\u0034\ufffd",
+ :intvector{},
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
+ {
+ "*test1",
+ :bin{ 0a0b },
+ "",
+ :intvector{},
+ :int{1}, :int{0}, "", "0", :bin{""}
+ }
+ {
+ "*test1bmp",
+ :bin{ 0c06 },
+ "\u0066",
+ :intvector{},
+ :int{0}, :int{0}, "", ".", :bin{""}
+ }
+ {
+ "*test5",
+ :bin{ 0906 },
+ "\udbc8\udf45\u0006",
+ :intvector{},
+ :int{0}, :int{0}, "", ".", :bin{""}
+ }
+ {
+ "ibm-16684",
+ :bin{ 0e },
+ "",
+ :intvector{},
+ :int{0}, :int{0}, "illegal", ".", :bin{ 0e }
+ }
+ {
+ "UTF-7",
+ :bin{ 2b414b4d2d492b414b4d4170412d },
+ "\u00a3I\u00a3\u00a4",
+ :intvector{ 1,5,7,9 },
+ :int{0}, :int{0}, "", ".", :bin{""}
+ }
+ {
+ "x11-compound-text",
+ :bin{ 1e6ddc9b26bc10801bbcad50a040fc },
+ "\u001e\u006d\u00dc\u009b\u0026\u00bc\u0010\u0080\ufffd\u00bc\u00ad\u0050\u00a0\u0040\u00fc",
+ :intvector{ },
+ :int{1}, :int{0}, "", "?", :bin{""}
+ }
}
}
fromUnicode {
Headers { "charset", "unicode", "bytes", "offsets", "flush", "fallbacks", "errorCode", "callback", "invalidUChars" }
Cases {
+ // Test ticket 9602: Add "good one-way" mapping type (|4).
+ // Such mappings are used regardless of the fallback flag.
+ {
+ "+*test3", "##\uFE0E#\uFE0F",
+ :bin{ 010204010204010204 }, :intvector{ 0,0,0,1,1,1,3,3,3 },
+ :int{1}, :int{0}, // no fallbacks
+ "", "?", ""
+ }
+ {
+ "+*test3", "##\uFE0E#\uFE0F",
+ :bin{ 010204010204010204 }, :intvector{ 0,0,0,1,1,1,3,3,3 },
+ :int{1}, :int{1}, // with fallbacks
+ "", "?", ""
+ }
+ // Test ticket 6789: implement Java-compatible Unicode, UnicodeBig and UnicodeLittle converters
+ // For details about these encodings see convrtrs.txt.
+ // Standard UTF-16BE
+ { "UTF-16BE", "a", :bin{ 0061 }, :intvector{ 0,0 }, :int{1}, :int{0}, "", "?", "" }
+ // Java "UnicodeBig" writes a BOM
+ { "UnicodeBig", "a", :bin{ feff0061 }, :intvector{ -1,-1,0,0 }, :int{1}, :int{0}, "", "?", "" }
+ // Standard UTF-16LE
+ { "UTF-16LE", "a", :bin{ 6100 }, :intvector{ 0,0 }, :int{1}, :int{0}, "", "?", "" }
+ // Java "UnicodeLittle" writes a BOM
+ { "UnicodeLittle", "a", :bin{ fffe6100 }, :intvector{ -1,-1,0,0 }, :int{1}, :int{0}, "", "?", "" }
+
+ // Test ticket 7704: implement Java-compatible "UTF-16" converter.
+ // Same as standard UTF-16 but fromUnicode always writes big-endian byte stream.
+ { "+UTF-16,version=2", "a", :bin{ feff0061 }, :intvector{ -1,-1,0,0 }, :int{1}, :int{0}, "", "?", "" }
+
// Test bug 6071 (1:2 Unicode:charset SBCS mapping).
{
"*test1bmp",
:intvector{ 0,1,1,1,1,3,3,4,4,4,4,4,6,6,7,7,7,8,9,9,9,10,11,11,11 },
:int{1}, :int{0}, "", "?", ""
}
+ // LMBCS
+ {
+ "lmbcs",
+ "\u0061\u2013\u00fc\u00e1\u0007\u0091\u0a74\u0200\ud84d\udc56\u5516",
+ :bin { 61039681a00f270f91140a7414f60214d84d14dc561088a0 },
+ :intvector{ 0, 1, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10 },
+ :int{1}, :int{0}, "", ".", ""
+ }
// Test substitution strings.
{
"windows-1252", // stateless MBCS with WriteSub(), should internally set char *
:int{1}, :int{1}, "", ".", ""
}
+ /*
+ * ICU 4.4 (ticket #7314) removes mappings for CNS 11643 planes 3..7
// ISO-2022-CN-EXT with all subcharsets and shifts and with supplementary code points
{
"ISO-2022-CN-EXT",
:intvector{ 0,0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4 },
:int{0}, :int{1}, "", ".", ""
}
+ */
// windows-936 vs. ibm-1386
{
:intvector{ 0, 1, 1, 1, 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 9 },
:int{1}, :int{0}, "", "?", ""
}
-
+ {
+ "x11-compound-text",
+ "\u54A1\u00A5\u00E3\u0120\u0121\u011E\u0041\u0135\u02D9\u0E3F\u0100\u0157\u0384\u0660\u05D0\u0401",
+ :bin{ 1b242944b5ac1b2d41a5e31b2d43d5f51b2d4dd01b2d41411b2d43bc1b2d42ff1b2d54df1b2d44c0b31b2d46b41b2d47b01b2d48e01b2d4ca1 },
+ :intvector{ },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ // Test Gurmukhi (Bindi Tippi and Consonant clusters)
+ {
+ "iscii-gur",
+ "\u0a15\u0a70\u0a02\u0a71\u0a15\u0a5c\u0a4d\u0a39\u000a\u0043\u0041\u000a",
+ :bin { ef4bb3a2a2b3e8b3bfe9e8d80aef4b43410a },
+ :intvector{ 0, 0, 0, 1, 2, 3, 3, 3, 5, 5, 6, 7, 8, 8, 8, 9, 10, 11 },
+ :int{1}, :int{0}, "", ".", ""
+ }
// escape callback
{
- "ISCII",
+ "iscii-dev",
"A\u0901\U00023456\u0902B\U00023456C",
:bin{ 41ef42a1255544383444255544433536a24225554438344425554443353643 },
:intvector{
{ "UTF-8", "a\ud800b", :bin{ 61efbfbd62 }, :intvector{ 0, 1, 1, 1, 2 }, :int{1}, :int{0}, "", "", "" }
// Code coverage for the EUC variants.
- { "EUC-JP", "\u0061\u4edd\u5bec\ud801\udc01\ud801\u0061\u00a2", :bin{ 61a1b88ff4ae618ee0 }, :intvector{ 0, 1, 1, 2, 2, 2, 6, 7, 7 }, :int{1}, :int{0}, "", "0", "" }
- { "EUC-JP", "\u0061\u4edd\u5bec\ud801\udc01\ud801\u0061\u00a2", :bin{ 61a1b88ff4aef4fef4fe618ee0 }, :intvector{ 0, 1, 1, 2, 2, 2, 3, 3, 5, 5, 6, 7, 7 }, :int{1}, :int{0}, "", "", "" }
+ { "IBM-eucJP", "\u0061\u4edd\u5bec\ud801\udc01\ud801\u0061\u00a2", :bin{ 61a1b88ff4ae618ee0 }, :intvector{ 0, 1, 1, 2, 2, 2, 6, 7, 7 }, :int{1}, :int{0}, "", "0", "" }
+ { "IBM-eucJP", "\u0061\u4edd\u5bec\ud801\udc01\ud801\u0061\u00a2", :bin{ 61a1b88ff4aef4fef4fe618ee0 }, :intvector{ 0, 1, 1, 2, 2, 2, 3, 3, 5, 5, 6, 7, 7 }, :int{1}, :int{0}, "", "", "" }
{ "EUC-TW", "\u0061\u2295\u5BF2\ud801\udc01\ud801\u0061\u8706\u008a", :bin{ 61a2d38ea2dce561e6ca8a }, :intvector{ 0, 1, 1, 2, 2, 2, 2, 6, 7, 7, 8 }, :int{1}, :int{0}, "", "0", "" }
{ "EUC-TW", "\u0061\u2295\u5BF2\ud801\udc01\ud801\u0061\u8706\u008a", :bin{ 61a2d38ea2dce5fdfefdfe61e6ca8a }, :intvector{ 0, 1, 1, 2, 2, 2, 2, 3, 3, 5, 5, 6, 7, 7, 8 }, :int{1}, :int{0}, "", "", "" }
+
+ // Code Coverage for BOCU-1
+ {
+ "BOCU-1",
+ "\u0041\ud841\ud888\udc81",
+ :bin{ 91fbc555fd6349 },
+ :intvector{ 0, 1, 1, 1, 2, 2, 2 },
+ :int{1}, :int{0}, "", ".", ""
+ }
+ {
+ "BOCU-1",
+ "\ufe88\ufe70\udbff\udfff\u0061",
+ :bin{ fbeda44ff0fe189bb821f05926 },
+ :intvector{},
+ :int{1}, :int{0}, "", ".", ""
+ }
+ // Improve code coverage for SCSU
+ {
+ "SCSU",
+ "\ud899\udc7f\ud977\ud888\udc99\ud888\u0041",
+ :bin{ 0fd899dc7fd888dc99e041 },
+ :intvector{},
+ :int{1}, :int{0}, "", "0", ""
+ }
+ {
+ "gb18030",
+ "\U00020087\ue790\ue78f\u1e3f",
+ :bin{ 95329031a6dca6dba8bc },
+ :intvector{ 0,0,0,0,2,2,3,3,4,4 },
+ :int{1}, :int{0}, "", "0", ""
+ }
+ {
+ "UTF-7",
+ "\u00a3I\u00a3\u00a4",
+ :bin{ 2b414b4d2d492b414b4d4170412d },
+ :intvector{ 0,0,0,0,0,1,2,2,2,3,3,3,3,3 },
+ :int{1}, :int{0}, "", "0", ""
+ }
+ // Bug #9601 direct-from-UTF-8 m:n Unicode:charset conversion.
+ {
+ "*test1bmp",
+ "uv",
+ :bin{ 08 },
+ :intvector{ 0 },
+ :int{1}, :int{0}, "", "?", ""
+ }
+ {
+ "*test2",
+ "\U00101234\U00050005",
+ :bin{ 0700010e05 },
+ :intvector{ 0,0,0,0,0 },
+ :int{1}, :int{0}, "", "?", ""
+ }
}
}
// which - numeric UConverterUnicodeSet value
Headers { "charset", "map", "mapnot", "which" }
Cases {
+ // Test ticket 9602: Add "good one-way" mapping type (|4).
+ // Excluded from roundtrip set, included in the set with fallbacks.
+ {
+ "+*test3",
+ "[{#\uFE0F}]",
+ "[#{#\uFE0E}]",
+ :int{0}
+ }
+ {
+ "+*test3",
+ "[#{#\uFE0E}{#\uFE0F}]",
+ "[]",
+ :int{1}
+ }
// Unicode charsets that do not map surrogate code points
{
"UTF-8",
"[\x0e\x0f\x1b\u4e29\uffe6-\U0010ffff]",
:int{0}
}
+ /*
+ * ICU 4.4 (ticket #7314) removes mappings for CNS 11643 planes 3..7
{
"ISO-2022-CN-EXT",
"[\x00-\x0d\x10-\x1a\x1c-\x7f\u4e00-\u4e05\u9f98\ufe6b\u4e28-\u4e2b\U00020000\U00020003-\U00020005\U00029664]",
"[\x0e\x0f\x1b\U00020001\U00020002\U0002a6d7-\U0010ffff]",
:int{0}
}
+ */
// HZ
{