Skip to content
Tcl Source Code Artifact [d329931190]
Login

Artifact [d329931190]

Artifact d32993119039c0e4586e58bfdd750bdb6fe434e3613310dc547b1b0fd983c7ef:

Ticket change [d329931190] - Ticket [c5bcbf349489ed52|c5bcbf3494] <i>Output of surrogates seems to repeat following character</i> status still Open with 4 other changes by apnadkarni on 2023-07-05 09:52:07.
D 2023-07-05T09:52:07.003
J assignee jan.nijtmans
J icomment Finally\sgot\sback\sto\slooking\sat\sthis\sissue.\sIt\sappears\sthe\ssurrogate\shandling\sin\sTcl\s8.7\sis\sthe\scause\s(9.0\sdoes\snot\shave\sthe\sproblem.)\r\n\r\nThe\sregexp\scorrectly\sreturns\sa\sTcl_Obj\scontaining\sa\slist\swith\sa\ssingle\sTcl_Obj\scontaining\s0x00000041,\s0x0000D800,\s0x00000042.\r\n\r\nWhen\sthis\slist\sis\sprinted,\sthe\sTcl_Obj.bytes\sis\sgenerated\sfor\sit\sin\sExtendStringRepWithUnicode\sin\s[this](https://core.tcl-lang.org/tcl/file?ci=7a68ac2af72f2ef2&name=generic/tclStringObj.c&ln=4886-4888)\sloop.\r\n\r\nThe\sproblem\sis\s`Tcl_UnicharToUtf`\sremembers\sthe\spresence\sof\sthe\sD800\sby\sstoring\sthe\sutf\ssequence\sin\sbuf[].\sHowever,\son\sthe\snext\siteration\s(for\s0x00000042)\sthis\sis\s[ignored](https://core.tcl-lang.org/tcl/file?ci=7a68ac2af72f2ef2&name=generic/tclUtf.c&ln=218)\s(there\sis\sno\sway\sfor\sthis\sto\sbe\sdetected\sas\sfar\sas\sI\scan\ssee).\sConsequently,\sthe\s0xF0\sfragment\sremains\sas\sthe\sremnant\sfor\sthe\s\\uD800\stransform\sto\sutf8.\r\n\r\nJan,\sassigning\sto\syou\sas\sI\sdo\snot\sgrok\sthe\swhole\ssurrogate\shandling\sbusiness\sin\s8.7.\sIn\smy\sview\sit\sis\sa\svaliant\sattempt\sto\ssupport\sin\s8.7\sbut\skeeps\sthrowing\sup\sbugs.
J login apnadkarni
J mimetype text/x-markdown
K c5bcbf349489ed5260b2fd21a3d9f7a195d82585
U apnadkarni
Z 1f37bb8a48bcbaf95416473d465111dd