Skip to content
Tcl Source Code Artifact [44cd007308]
Login

Artifact [44cd007308]

Artifact 44cd00730811d5120952dd345400a5c984992e29f39e9598e075d622f33fd5fd:

Ticket change [44cd007308] - Ticket [27944a3661a5e409|27944a3661] <i>Taming test utf-6.88</i> status still Open with 3 other changes by jan.nijtmans on 2020-04-19 10:02:40.
D 2020-04-19T10:02:40.205
J icomment Here\sis\sthe\sdocumentation\sfrom\sUtf.n:\r\n<pre>\r\nGiven\s\\fIsrc\\fR,\sa\spointer\sto\ssome\slocation\sin\sa\sUTF-8\sstring,\r\n\\fBTcl_UtfNext\\fR\sreturns\sa\spointer\sto\sthe\snext\sUTF-8\scharacter\sin\sthe\r\nstring.\s\sThe\scaller\smust\snot\sask\sfor\sthe\snext\scharacter\safter\sthe\slast\r\ncharacter\sin\sthe\sstring\sif\sthe\sstring\sis\snot\sterminated\sby\sa\snull\r\ncharacter.\r\n</pre>\r\n\r\nThe\swording\sin\sthe\ssource\scode\sof\stclUtf.c\sis\sless\sclear,\sso\sI\spropose\r\nto\scopy\sthe\swording\sfrom\sUtf.n\sto\stclUtf.c\sIn\sthe\sgiven\sexample,\sthe\s\\xA0\sbyte\sis\sa\svalid\s'some\slocation\sin\sa\sUTF-8\sstring'.\sThe\snext\scharacter\sstarts\sat\sindex\s3,\sso\sthat\sshould\sbe\sthe\sanswer.\r\n\r\nProposed\sfix\sin\scommit:\s[74d3f929c887755e].\s\sI\sleave\sit\sto\syou\sto\simplement\sthe\ssame\sin\sthe\soptimized\simplementation\syou\sare\sworking\son.\r\n\r\nThis\sis\sa\slong-standing\sbug.\sSince\sTcl\snever\scalls\sTcl_UtfNext()\sto\srandom\slocations\sin\sa\sstring,\sthere\swere\snever\stest-cases\scovering\sthis\ssituation.\sNow\sthere\sare:\sThanks\sfor\sthat,\sDon!
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K 27944a3661a5e409dead945dbc8f9e4a50033e62
U jan.nijtmans
Z 2173ccd572f4b7adabd1d2c89aea0da1