diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-24 16:46:27 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-24 16:46:27 (GMT) |
commit | aaf56c80863b3c12efb020dd21eaa440be153968 (patch) | |
tree | d515caef3b2c932903e21ec60e4b39075e80e54c /generic | |
parent | c4f3c560ab53310ee20909614152c26620b952bb (diff) | |
parent | f0800555067a88f3f16b15ce5f99a77c506c589b (diff) | |
download | tcl-aaf56c80863b3c12efb020dd21eaa440be153968.zip tcl-aaf56c80863b3c12efb020dd21eaa440be153968.tar.gz tcl-aaf56c80863b3c12efb020dd21eaa440be153968.tar.bz2 |
Since only bytes 0xF0 - 0xF4 can be the first byte of a valid 4-byte UTF-8 byte sequence, account for that in Tcl_UtfCharComplete(). Only effective when TCL_UTF_MAX>3
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclUtf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 40dc29f..d3d33c2 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -69,11 +69,11 @@ static const unsigned char totalBytes[256] = { 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,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,4,4,4, + 4,4,4,4,4, #else - 1,1,1,1,1,1,1,1, + 1,1,1,1,1, #endif - 1,1,1,1,1,1,1,1 + 1,1,1,1,1,1,1,1,1,1,1 }; /* |