Skip to content
Tcl Source Code Artifact [ddb2cc6ea0]
Login

Artifact [ddb2cc6ea0]

Artifact ddb2cc6ea01f4b76b7eea69318af7a9ef78bea0af53e3e85b89aa6ec4d8c3ac1:

Ticket change [ddb2cc6ea0] - Ticket [27944a3661a5e409|27944a3661] <i>Taming test utf-6.88</i> status still Open with 3 other changes by jan.nijtmans on 2020-04-22 22:31:10.
D 2020-04-22T22:31:10.201
J icomment Other\spart\sof\sthe\sdocumentation:\r\n<pre>\r\n\\fBTcl_UtfCharComplete\\fR\sreturns\s1\sif\sthe\ssource\sUTF-8\sstring\s\\fIsrc\\fR\r\nof\s\\fIlength\\fR\sbytes\sis\slong\senough\sto\sbe\sdecoded\sby\r\n\\fBTcl_UtfToUniChar\\fR,\sor\s0\sotherwise\r\n</pre>\r\n\r\nThe\sfunction\sTcl_UtfNext()\sis\s-\sand\salways\shas\sbeen\s-\sdocumented\sto\srequire\sthe\sstring\sto\sbe\s0-terminated.\sThere\snever\shas\sbeen\sa\srelation\sbetween\sTcl_UtfCharComplete()\sand\sTcl_UtfNext().\sThere\snever\shas\sbeen\sa\sloop\sin\sTcl\swhere\sTcl_UtfCharComplete()\swas\sused\sfor\schecking\swhether\sTcl_UtfNext()\scan\sbe\scalled.\sThere\swas\seven\snever\sdocumented\show\smany\sbytes\sTcl_UtfNext()\sis\sallowed\sto\sread\sin\sthe\scase\sof\sabsence\sof\sthe\sterminating\s0-byte.\sBut\ssince\sTcl_UtfPrev()\sis\sdocumented\sto\sread\sa\smaximum\sof\sTCL_UTF_MAX\sbytes,\sit's\slogical\sto\sassume\sthe\ssame\sfor\sTcl_UtfNext().\r\n\r\nThis\smeans,\scare\sis\srequired\sreplacing\sTcl_UtfToUniChar()\scalls\swith\sTcl_UtfNext().\sTcl_UtfNext()\sis\snot\ssimply\san\soptimized\sreplacement\sfor\sTcl_UtfToUniChar().\sThose\stwo\sfunctions\sbehave\sdifferently\swhen\sencountering\sinvalid\sbyte\ssequences.
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K 27944a3661a5e409dead945dbc8f9e4a50033e62
U jan.nijtmans
Z f726928a178415b6247b34ae36564e32