Index: generic/tclExecute.c ================================================================== --- generic/tclExecute.c +++ generic/tclExecute.c @@ -5569,20 +5569,14 @@ Tcl_GetByteArrayFromObj(valuePtr, NULL)+index, 1); } else if (valuePtr->bytes && length == valuePtr->length) { objResultPtr = Tcl_NewStringObj((const char *) valuePtr->bytes+index, 1); } else { - char buf[4] = ""; + char buf[8] = ""; Tcl_UniChar ch = Tcl_GetUniChar(valuePtr, index); - /* - * This could be: Tcl_NewUnicodeObj((const Tcl_UniChar *)&ch, 1) - * but creating the object as a string seems to be faster in - * practical use. - */ - - length = Tcl_UniCharToUtf(ch, buf); + length = TclUCS4ToUtf(ch, buf); objResultPtr = Tcl_NewStringObj(buf, length); } TRACE_APPEND(("\"%s\"\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); Index: generic/tclUtf.c ================================================================== --- generic/tclUtf.c +++ generic/tclUtf.c @@ -62,20 +62,39 @@ static const unsigned char totalBytes[256] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -#if TCL_UTF_MAX != 4 +/* Tcl_UtfCharComplete() might point to 2nd byte of valid 4-byte sequence */ + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +/* End of "continuation byte section" */ + 2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +#if TCL_UTF_MAX > 3 + 4,4,4,4,4, +#else + 1,1,1,1,1, +#endif + 1,1,1,1,1,1,1,1,1,1,1 +}; + +static const unsigned char complete[256] = { + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +#if TCL_UTF_MAX > 4 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, #else /* Tcl_UtfCharComplete() might point to 2nd byte of valid 4-byte sequence */ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, #endif 2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -#if TCL_UTF_MAX > 3 +#if TCL_UTF_MAX > 4 4,4,4,4,4, #else 1,1,1,1,1, #endif 1,1,1,1,1,1,1,1,1,1,1 @@ -555,11 +574,11 @@ Tcl_UtfCharComplete( const char *src, /* String to check if first few bytes contain * a complete UTF-8 character. */ int length) /* Length of above string in bytes. */ { - return length >= totalBytes[UCHAR(*src)]; + return length >= complete[UCHAR(*src)]; } /* *--------------------------------------------------------------------------- * Index: tests/utf.test ================================================================== --- tests/utf.test +++ tests/utf.test @@ -395,11 +395,11 @@ testutfnext \xF2\xA0\xA0G } 1 test utf-6.69.0 {Tcl_UtfNext} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0 } 1 -test utf-6.69.1 {Tcl_UtfNext} {testutfnext fullutf} { +test utf-6.69.1 {Tcl_UtfNext} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0 } 4 test utf-6.70 {Tcl_UtfNext} testutfnext { testutfnext \xF2\xA0\xA0\xD0 } 1 @@ -413,41 +413,41 @@ testutfnext \xF2\xA0\xA0\xF8 } 1 test utf-6.74.0 {Tcl_UtfNext} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0G } 1 -test utf-6.74.1 {Tcl_UtfNext} {testutfnext fullutf} { +test utf-6.74.1 {Tcl_UtfNext} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0G } 4 test utf-6.75.0 {Tcl_UtfNext} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xA0 } 1 -test utf-6.75.1 {Tcl_UtfNext} {testutfnext fullutf} { +test utf-6.75.1 {Tcl_UtfNext} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xA0 } 4 test utf-6.76.0 {Tcl_UtfNext} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xD0 } 1 -test utf-6.76.1 {Tcl_UtfNext} {testutfnext fullutf} { +test utf-6.76.1 {Tcl_UtfNext} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xD0 } 4 test utf-6.77.0 {Tcl_UtfNext} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xE8 } 1 -test utf-6.77.1 {Tcl_UtfNext} {testutfnext fullutf} { +test utf-6.77.1 {Tcl_UtfNext} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xE8 } 4 test utf-6.78.0 {Tcl_UtfNext} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xF2 } 1 -test utf-6.78.1 {Tcl_UtfNext} {testutfnext fullutf} { +test utf-6.78.1 {Tcl_UtfNext} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xF2 } 4 test utf-6.79.0 {Tcl_UtfNext} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0G\xF8 } 1 -test utf-6.79.1 {Tcl_UtfNext} {testutfnext fullutf} { +test utf-6.79.1 {Tcl_UtfNext} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0G\xF8 } 4 test utf-6.80 {Tcl_UtfNext - overlong sequences} testutfnext { testutfnext \xC0\x80 } 2 @@ -470,11 +470,11 @@ testutfnext \xF0\x80\x80\x80 } 1 test utf-6.87.0 {Tcl_UtfNext - overlong sequences} {testutfnext ucs2} { testutfnext \xF0\x90\x80\x80 } 1 -test utf-6.87.1 {Tcl_UtfNext - overlong sequences} {testutfnext fullutf} { +test utf-6.87.1 {Tcl_UtfNext - overlong sequences} {testutfnext ucs4} { testutfnext \xF0\x90\x80\x80 } 4 test utf-6.88 {Tcl_UtfNext, pointing to 2th byte of 3-byte valid sequence} testutfnext { testutfnext \xA0\xA0 } 1 @@ -482,34 +482,40 @@ testutfnext \x80\x80 } 1 test utf-6.90.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} { testutfnext \xF4\x8F\xBF\xBF } 1 -test utf-6.90.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} { +test utf-6.90.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs4} { testutfnext \xF4\x8F\xBF\xBF } 4 test utf-6.91.0 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext ucs2} { testutfnext \xF4\x90\x80\x80 } 1 test utf-6.91.1 {Tcl_UtfNext, validity check [493dccc2de]} {testutfnext fullutf} { testutfnext \xF4\x90\x80\x80 } 1 -test utf-6.92 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} testutfnext { +test utf-6.92.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext ucs2} { + testutfnext \xA0\xA0\xA0 +} 1 +test utf-6.92.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte valid sequence} {testutfnext fullutf knownBug} { testutfnext \xA0\xA0\xA0 -} 1 +} 3 test utf-6.93.0 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext ucs2} { testutfnext \x80\x80\x80 -} 1 +} 3 test utf-6.93.1 {Tcl_UtfNext, pointing to 2th byte of 4-byte invalid sequence} {testutfnext fullutf knownBug} { testutfnext \x80\x80\x80 } 3 -test utf-6.94 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} testutfnext { +test utf-6.94.0 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext ucs2} { + testutfnext \xA0\xA0\xA0\xA0 +} 1 +test utf-6.94.1 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext fullutf knownBug} { testutfnext \xA0\xA0\xA0\xA0 -} 1 +} 3 test utf-6.95 {Tcl_UtfNext, pointing to 2th byte of 5-byte invalid sequence} {testutfnext ucs2} { testutfnext \x80\x80\x80\x80 -} 1 +} 3 test utf-6.96 {Tcl_UtfNext, read limits} testutfnext { testutfnext G 0 } 0 test utf-6.97 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0 0 @@ -551,80 +557,80 @@ testutfnext \xE8\xA0\xA0\xA0 3 } 3 test utf-6.110.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0G 1 } 1 -test utf-6.110.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.110.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0G 1 } 0 test utf-6.111.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0G 2 } 1 -test utf-6.111.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.111.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0G 2 } 0 test utf-6.112.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0G 3 } 1 -test utf-6.112.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.112.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0G 3 } 0 test utf-6.113.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0G 4 } 1 -test utf-6.113.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.113.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0G 4 } 4 test utf-6.114.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xA0 1 } 1 -test utf-6.114.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.114.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xA0 1 } 0 test utf-6.115.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xA0 2 } 1 -test utf-6.115.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.115.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xA0 2 } 0 test utf-6.116.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xA0 3 } 1 -test utf-6.116.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.116.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xA0 3 } 0 test utf-6.117.0 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xF2\xA0\xA0\xA0\xA0 4 } 1 -test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext fullutf} { +test utf-6.117.1 {Tcl_UtfNext, read limits} {testutfnext ucs4} { testutfnext \xF2\xA0\xA0\xA0\xA0 4 } 4 test utf-6.118 {Tcl_UtfNext, read limits} testutfnext { testutfnext \xA0G 0 } 0 test utf-6.119 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0G 1 -} 1 +} 0 test utf-6.120 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0\xA0 1 -} 1 +} 0 test utf-6.121 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0\xA0G 2 -} 1 +} 0 test utf-6.122 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0\xA0\xA0 2 -} 1 -test utf-6.123 {Tcl_UtfNext, read limits} testutfnext { +} 0 +test utf-6.123 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0\xA0\xA0G 3 } 1 -test utf-6.124 {Tcl_UtfNext, read limits} testutfnext { +test utf-6.124 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0\xA0\xA0\xA0 3 } 1 -test utf-6.125 {Tcl_UtfNext, read limits} testutfnext { +test utf-6.125 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0\xA0\xA0\xA0G 4 } 1 -test utf-6.126 {Tcl_UtfNext, read limits} testutfnext { +test utf-6.126 {Tcl_UtfNext, read limits} {testutfnext ucs2} { testutfnext \xA0\xA0\xA0\xA0\xA0 4 } 1 test utf-7.1 {Tcl_UtfPrev} testutfprev { testutfprev {} @@ -690,23 +696,23 @@ testutfprev A\xF8\xA0\xF8\xA0 3 } 2 test utf-7.10.0 {Tcl_UtfPrev} {testutfprev ucs2} { testutfprev A\xF2\xA0 } 2 -test utf-7.10.1 {Tcl_UtfPrev} {testutfprev fullutf} { +test utf-7.10.1 {Tcl_UtfPrev} {testutfprev ucs4} { testutfprev A\xF2\xA0 } 1 test utf-7.10.2 {Tcl_UtfPrev} {testutfprev ucs2} { testutfprev A\xF2\xA0\xA0\xA0 3 } 2 -test utf-7.10.3 {Tcl_UtfPrev} {testutfprev fullutf} { +test utf-7.10.3 {Tcl_UtfPrev} {testutfprev ucs4} { testutfprev A\xF2\xA0\xA0\xA0 3 } 1 test utf-7.10.4 {Tcl_UtfPrev} {testutfprev ucs2} { testutfprev A\xF2\xA0\xF8\xA0 3 } 2 -test utf-7.10.5 {Tcl_UtfPrev} {testutfprev fullutf} { +test utf-7.10.5 {Tcl_UtfPrev} {testutfprev ucs4} { testutfprev A\xF2\xA0\xF8\xA0 3 } 1 test utf-7.11 {Tcl_UtfPrev} testutfprev { testutfprev A\xE8\xA0 } 1 @@ -747,23 +753,23 @@ testutfprev A\xF8\xA0\xA0\xF8 4 } 3 test utf-7.15.0 {Tcl_UtfPrev} {testutfprev ucs2} { testutfprev A\xF2\xA0\xA0 } 3 -test utf-7.15.1 {Tcl_UtfPrev} {testutfprev fullutf} { +test utf-7.15.1 {Tcl_UtfPrev} {testutfprev ucs4} { testutfprev A\xF2\xA0\xA0 } 1 test utf-7.15.1.0 {Tcl_UtfPrev} {testutfprev ucs2} { testutfprev A\xF2\xA0\xA0\xA0 4 } 3 -test utf-7.15.1.1 {Tcl_UtfPrev} {testutfprev fullutf} { +test utf-7.15.1.1 {Tcl_UtfPrev} {testutfprev ucs4} { testutfprev A\xF2\xA0\xA0\xA0 4 } 1 test utf-7.15.2.0 {Tcl_UtfPrev} {testutfprev ucs2} { testutfprev A\xF2\xA0\xA0\xF8 4 } 3 -test utf-7.15.2.1 {Tcl_UtfPrev} {testutfprev fullutf} { +test utf-7.15.2.1 {Tcl_UtfPrev} {testutfprev ucs4} { testutfprev A\xF2\xA0\xA0\xF8 4 } 1 test utf-7.16 {Tcl_UtfPrev} testutfprev { testutfprev A\xE8\xA0\xA0 } 1 @@ -885,23 +891,23 @@ testutfprev A\xE0\xA0\x80 2 } 1 test utf-7.39.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} { testutfprev A\xF0\x90\x80\x80 } 2 -test utf-7.39.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} { +test utf-7.39.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs4} { testutfprev A\xF0\x90\x80\x80 } 1 test utf-7.40.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} { testutfprev A\xF0\x90\x80\x80 4 } 3 -test utf-7.40.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} { +test utf-7.40.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs4} { testutfprev A\xF0\x90\x80\x80 4 } 1 test utf-7.41.0 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs2} { testutfprev A\xF0\x90\x80\x80 3 } 2 -test utf-7.41.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev fullutf} { +test utf-7.41.1 {Tcl_UtfPrev -- overlong sequence} {testutfprev ucs4} { testutfprev A\xF0\x90\x80\x80 3 } 1 test utf-7.42 {Tcl_UtfPrev -- overlong sequence} testutfprev { testutfprev A\xF0\x90\x80\x80 2 } 1 @@ -930,23 +936,23 @@ testutfprev \xE8\xA0\x00 2 } 0 test utf-7.48.0 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { testutfprev A\xF4\x8F\xBF\xBF } 2 -test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { +test utf-7.48.1 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs4} { testutfprev A\xF4\x8F\xBF\xBF } 1 test utf-7.48.2 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { testutfprev A\xF4\x8F\xBF\xBF 4 } 3 -test utf-7.48.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { +test utf-7.48.3 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs4} { testutfprev A\xF4\x8F\xBF\xBF 4 } 1 test utf-7.48.4 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs2} { testutfprev A\xF4\x8F\xBF\xBF 3 } 2 -test utf-7.48.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev fullutf} { +test utf-7.48.5 {Tcl_UtfPrev, validity check [493dccc2de]} {testutfprev ucs4} { testutfprev A\xF4\x8F\xBF\xBF 3 } 1 test utf-7.48.6 {Tcl_UtfPrev, validity check [493dccc2de]} testutfprev { testutfprev A\xF4\x8F\xBF\xBF 2 } 1 @@ -985,14 +991,14 @@ string index \u4E4E\u25A\xFF\u543 2 } \uFF test utf-8.5.0 {Tcl_UniCharAtIndex: high surrogate} ucs2 { string index \uD842 0 } \uD842 -test utf-8.5.1 {Tcl_UniCharAtIndex: high surrogate} {ucs4 knownBug} { +test utf-8.5.1 {Tcl_UniCharAtIndex: high surrogate} ucs4 { string index \uD842 0 } \uD842 -test utf-8.5.2 {Tcl_UniCharAtIndex: high surrogate} {tip389 knownBug} { +test utf-8.5.2 {Tcl_UniCharAtIndex: high surrogate} tip389 { string index \uD842 0 } \uD842 test utf-8.6 {Tcl_UniCharAtIndex: low surrogate} { string index \uDC42 0 } \uDC42 @@ -1180,11 +1186,11 @@ bsCheck \ua 10 bsCheck \uA 10 bsCheck \340 224 bsCheck \uA1 161 bsCheck \u4E21 20001 -bsCheck \741 225 pre388 ;# == \341 +bsCheck \741 225 pre388 ;# == \341 bsCheck \741 60 !pre388 ;# == \74 1 bsCheck \U 85 bsCheck \Uk 85 bsCheck \U41 65 Uesc bsCheck \Ua 10 Uesc @@ -1342,11 +1348,11 @@ test utf-20.2 {[4c591fa487] TclUniCharNcmp/TclUtfNcmp} knownBug { set one [format %c 0xFFFF] set two [format %c 0x10000] set first [string compare $one $two] string range $one 0 0 - string range $two 0 0 + string range $two 0 0 set second [string compare $one $two] expr {($first == $second) ? "agree" : "disagree"} } agree test utf-21.1 {TclUniCharIsAlnum} { @@ -1464,13 +1470,13 @@ variable count 1 UniCharCaseCmpTest < a b UniCharCaseCmpTest > b a UniCharCaseCmpTest > B a UniCharCaseCmpTest > aBcB abca -UniCharCaseCmpTest < \uFFFF [format %c 0x10000] ucs4 +UniCharCaseCmpTest < \uFFFF [format %c 0x10000] ucs4 UniCharCaseCmpTest < \uFFFF \U10000 {Uesc ucs4} -UniCharCaseCmpTest > [format %c 0x10000] \uFFFF ucs4 +UniCharCaseCmpTest > [format %c 0x10000] \uFFFF ucs4 UniCharCaseCmpTest > \U10000 \uFFFF {Uesc ucs4}