- {
- /* surrogate pair*/
- static const UChar iso_2022_jp_inputText4[]={ 0x3000, 0xD84D, 0xDC56, 0x3001,0xD84D,0xDC56, 0x0042,0x0901c } ;
- static const uint8_t to_iso_2022_jp4_v3[]={
- 0x1b, 0x24, 0x42, 0x21, 0x21,
- 0x1b, 0x28, 0x42, 0x26, 0x23, 0x78, 0x32, 0x33, 0x34, 0x35, 0x36, 0x3b ,
-
- 0x1b, 0x24, 0x42, 0x21, 0x22,
- 0x1b, 0x28, 0x42, 0x26, 0x23, 0x78, 0x32, 0x33, 0x34, 0x35, 0x36, 0x3b ,
-
- 0x42,
- 0x26, 0x23, 0x78, 0x39, 0x30, 0x31, 0x43, 0x3b,
- };
-
- static const int32_t from_iso_2022_jpOffs4_v3 [] ={
- 0,0,0,0,0,
- 1,1,1,1,1,1,1,1,1,1,1,1,
-
- 3,3,3,3,3,
- 4,4,4,4,4,4,4,4,4,4,4,4,
-
- 6,
- 7,7,7,7,7,7,7,7
- };
- if(!testConvertFromUnicodeWithContext(iso_2022_jp_inputText4, sizeof(iso_2022_jp_inputText4)/sizeof(iso_2022_jp_inputText4[0]),
- to_iso_2022_jp4_v3, sizeof(to_iso_2022_jp4_v3), "iso-2022-jp",
- UCNV_FROM_U_CALLBACK_ESCAPE, from_iso_2022_jpOffs4_v3, NULL, 0,UCNV_ESCAPE_XML_HEX,U_ZERO_ERROR ))
- log_err("u-> iso-2022-jp with sub & UCNV_ESCAPE_XML_HEX did not match.\n");
-
- }