Differences From Artifact [25c60f32b5]:
- File generic/tclUtf.c — part of check-in [11eb38dbe2] at 2020-04-17 09:17:16 on branch core-8-5-orig — Original implementation of Tcl 8.5 before the Tcl_UtfPrev/Tcl_UtfNext reform. But: Add the (harmless) TclUtfNext/TclUtfPrev macro's and add the 0xC1 byte as being invalid. Then ... add the testcases from core-8-5-branch (and a few more), with adapted expectations according to the original implementation. Let's see where we get. (user: jan.nijtmans size: 51201)
To Artifact [1baf563b6a]:
- File generic/tclUtf.c — part of check-in [7c70d7b16d] at 2020-04-19 20:49:34 on branch core-8-5-orig — Merge 8.5, and add the fix for [27944a3661] here too. Getting closer to what test-results we expect. Overlong sequences not handled yet, so that's where differences are expected (user: jan.nijtmans size: 51337) [more...]
| ︙ | ︙ | |||
642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
CONST char *
Tcl_UtfNext(
CONST char *src) /* The current location in the string. */
{
Tcl_UniChar ch;
return src + TclUtfToUniChar(src, &ch);
}
/*
*---------------------------------------------------------------------------
*
* Tcl_UtfPrev --
| > > > > > > | 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 |
CONST char *
Tcl_UtfNext(
CONST char *src) /* The current location in the string. */
{
Tcl_UniChar ch;
if (((*src) & 0xC0) == 0x80) {
if ((((*++src) & 0xC0) == 0x80) && (((*++src) & 0xC0) == 0x80)) {
++src;
}
return src;
}
return src + TclUtfToUniChar(src, &ch);
}
/*
*---------------------------------------------------------------------------
*
* Tcl_UtfPrev --
|
| ︙ | ︙ |