Skip to content
Tcl Source Code Artifact [1ed05bb442]
Login

Artifact [1ed05bb442]

Artifact 1ed05bb442f1512b7294fd1b78f4e50a1a94a9db616201848379216718a77306:

Ticket change [1ed05bb442] - New ticket [6474fbd934378bb2|6474fbd934] <i>Tcl 8.7a5: why utf-8 is different?</i>. by petasis on 2022-01-14 09:05:51.
D 2022-01-14T09:05:51.039
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment Hi\sall,\r\n\r\nI\sobserve\sa\sdifference\sin\sconverting\sstrings\sto\sutf-8\sbetween\sTcl\s8.6/8.7a1\sand\s8.7a5.\r\n\r\nIn\sTcl\s8.6\sI\sget:\r\n\r\nbinary\sscan\s[encoding\sconvertto\sutf-8\s\\uD800]\sH*\shex;\sputs\s$hex\r\n>\sefbfbd\r\n\r\nwhich\sseems\sthe\scorrect\sutf-8\sencoding.\r\n\r\nHowever,\sin\sTcl\s8.7a5\sI\sget:\r\n\r\nbinary\sscan\s[encoding\sconvertto\sutf-8\s\\uD800]\sH*\shex;\sputs\s$hex\r\n>\seda080\r\n\r\nWhat\sis\sthe\sreason\sfor\sthis\sdifference?\sShouldn't\sthe\sutf-8\sbytes\sbe\sthe\ssame,\sno\smatter\swhat\sinternal\srepresentation\sfor\sstrings\sis\sused\sby\sTcl?\r\n\r\nI\sknow\sthat\sthis\sis\sinvalid\sinput\s(and\sonly\shalf\sof\sa\s"character"),\sbut\sin\smy\sview\swhat\stcl\s8.6\sreturns\smakes\smuch\smore\ssense,\sas\sthere\sis\sa\s(very)\slimited\susage.\sThe\sbehaviour\sin\s8.7\sreturns\sa\scharacter,\shiding\sthe\sproblem\sin\sthe\sinput...\r\n\r\nGeorge
J foundin 8.7a5
J is_private 0
J login petasis
J priority 5\sMedium
J private_contact 3cb4dabca0e1e7b9d560b2ca060abb67f2a97f23
J resolution None
J severity Minor
J status Open
J submitter petasis
J subsystem 44.\sUTF-8\sStrings
J title Tcl\s8.7a5:\swhy\sutf-8\sis\sdifferent?
J type Bug
K 6474fbd934378bb2a9d505f2799f9787a10a3f09
U petasis
Z 7a074b2e59bf11b6ab56616fb24d9675