Skip to content
Tcl Source Code Artifact [57b5310133]
Login

Artifact [57b5310133]

Artifact 57b53101339ce8d618ad3d4eebf4475d2ba3aad3aa0dd6d6bbbb40ba92d80ae8:

Ticket change [57b5310133] - Ticket [28de50dcee4f6888|28de50dcee] <i>Crash on invalid Unicode code points</i> status still Closed with 5 other changes by apnadkarni on 2026-11-25 14:28:35.
D 2026-11-25T14:28:35.375
J closedate 2461370.1031872109
J closer apnadkarni
J icomment >\sWhat\scould\sbe\sdone\sadditionally\sis\sadd\sa\scheck\sto\sExtendStringRepWithUnicode,\sline\s4674,\slike:\r\n\r\nThat\sdoes\snot\sfix\sthe\sactual\sproblem\sin\sthat\sTclUtfCount\sreturns\sthe\swrong\svalue.\r\n\r\n>\sThe\sflag\sTCL_COMBINE\sis\suseful\sif\syou\swant\sto\sbuild\sa\sUTF-16\sdecoder\susing\sTcl_UniCharToUtf()\r\n\r\nI\sdon't\sget\sit.\sTcl_UniCharToUtf\stakes\sa\s32-bit\sUnichar\sand\soutputs\sUTF-8.\sWhere\sdoes\sUTF-16\scome\sin?\sSurrogate\scode\spoints\sabsolutely\sshould\snot\sbe\streated\sas\ssurrogates\sin\sUTF-32\ssequences.\sI\sreally\sdo\snot\slike\sthese\smodifications\sto\sthe\sUnicode\sstandard\sbehavior.\sDifferent\sparts\sof\sTcl\smake\sdiffering\sassumptions\swhich\smakes\sit\sdifficult\sto\sreason\sabout\scorrect\sbehavior.\sThere\s*might*\shave\sbeen\sa\sneed\sin\s8.x.\sThere\scertainly\sis\snot\sone\sin\sTcl\s9\sif\sthis\sis\sthe\sonly\suse\sfor\sthe\sflag.\sI'm\sgoing\sto\spush\sfor\sthis\sto\sbe\seliminated,\sparticularly\sas\sthe\sflag\sis\spassed\sas\spart\sof\sthe\sdata,\swhich\sis\sunwarranted.\r\n\r\nYes,\sI\sunderstand\sscripts\scannot\sgenerate\sinvalid\sencodings.\sBut\sas\sI\ssaid,\swe\sshould\stry\sand\sprotect\sagainst\sbad\sdata\scoming\sin\sthrough\sthe\sC\sAPI's\sas\swell.\r\n\r\nThanks\sfor\smerging\sto\s9.0\sbut\sit\sonly\screated\sa\sfork\sfor\sme\s:-)\sIt\stakes\sme\sa\swhile\sto\scherrypick\sbecause\sI\srepeat\sthe\stest\sand\svalgrind\scycle\sfor\smerges\sto\severy\sbranch.\s(8.6\sI\smore\sor\sless\signore).
J login apnadkarni
J mimetype text/x-markdown
K 28de50dcee4f6888eaed987bf1d795ac67138b5f
U apnadkarni
Z 29d147e0d0af9cee8cffb279d2ea2f60