Skip to content
Tcl Source Code Artifact [9b47b46d6c]
Login

Artifact [9b47b46d6c]

Artifact 9b47b46d6c176fad04424af5e185758aa2999bf413d21eb3969a78c63bb004df:

Ticket change [9b47b46d6c] - Ticket [945d2387d7234f63|945d2387d7] <i>Tcl_ExternalToUtf hangs on valid input if character limit is specified</i> status still Open with 3 other changes by apnadkarni on 2024-08-20 13:35:00.
D 2024-08-20T13:35:00.232
J icomment Yes,\sagree\sabout\s`CHAR_LIMIT`\simplementation.\sHowever,\sit\sis\s(unfortunately)\sused\sby\sthe\sTcl\schannel\ssystem.\sBelow\sis\sa\sreproduction\sof\sthe\sbug\swith\spure\sscript.\sThe\sbuffer\ssizes,\sread\ssizes\setc.\shave\sto\sbe\sexactly\sas\sbelow\sto\sreproduce.\sOf\scourse,\sother\ssequences\sare\spossible\sbut\snot\sclear\syet\swhat\sthe\sconditions\sfor\sreproduction\sare\sor\sif\sother\sencodings\sare\saffected.\r\n\r\nJust\screate\sthe\sfile.\r\n```\r\n%\sset\sutf16ch\s[encoding\sconvertto\sutf-16le\s\\u4e4e]\r\nNN\r\n%\sset\sfd\s[open\sx.txt\swb]\r\nfile20439562060\r\n%\sputs\s-nonewline\s$fd\s[string\srepeat\s$utf16ch\s334]\r\n%\sputs\s-nonewline\s$fd\s[encoding\sconvertto\sutf-16le\sA\\U1F600B]\r\n%\sclose\s$fd\r\n```\r\n\r\nTrigger\sthe\sbug\sby\sreading\sexactly\s336\scharacters\s(reading\sfewer\sor\smore\sworks).\r\n```\r\n%\sset\sfd\s[open\sx.txt]\r\nfile20437b89440\r\n%\sfconfigure\s$fd\s-encoding\sutf-16le\s-buffersize\s2000\r\n%\sread\s$fd\s336\r\n...hangs...\r\n```
J login apnadkarni
J mimetype text/x-markdown
K 945d2387d7234f63c9df461e36af02b9729ce941
U apnadkarni
Z 7b699cc089851a36a0e3517d9733e9dd