Skip to content
Tcl Source Code Artifact [1517a02e77]
Login

Artifact [1517a02e77]

Artifact 1517a02e77625713294cd44377bba809d89a2c6467866b21ab80adc5e5dddadc:

Ticket change [1517a02e77] - Ticket [e617e8a71a00496e|e617e8a71a] <i>comparing UTF-16 strings doesn&#39;t account for surrogates</i> status still Open with 3 other changes by dgp on 2020-04-30 18:23:27.
D 2020-04-30T18:23:27.897
J icomment \r\nWork\scontinues\son\sthis\sin\sa\sbranch,\sbut\sit's\sworth\snoting\sthat\smatters\r\nare\sconfusing\sand\sdifficult\sbecause\sroutines\sand\scommands\sthat\sby\r\ntheir\snames\sand\sdocumentation\sone\sexpects\sto\soperate\son\scharacters\r\nare\sactually\soperating\son\sUTF-16\scode\sunits.\s\sFor\sexample,\sif\sI\sdon't\r\nthink\svery\scarefully\sabout\sthe\simplementation\sdetails,\sthis\sresult\sis\r\nsurprising\sto\sme:\r\n\r\n%\sstring\scompare\s-length\s1\s\\U10000\s\\U10001\r\n0\r\n\r\nI\sthink\sit\swould\sbe\ssurprising\sto\sanyone\sgiving\sthe\sdocs\sfor\r\n[string\scompare]\sa\splain\sreading.\r\n\r\nMy\sknee-jerk\sreaction\sis\sto\swant\sto\srevise\s8.7\sso\sindexing\sand\slengths\r\ncount\scharacters\sand\snot\scode\sunits,\sbut\sI\sknow\sthat\smeans\sa\sTIP,\r\nand\sI\shave\sto\sbelieve\sthere\swere\sstrong\sreasons\snot\sto\sdo\sthat\sin\r\nthe\sfirst\splace.\r\n\r\nIf\swe\sdo\snot\sattempt\ssomething\slike\sthat,\sthough,\swe'll\sneed\sto\s\r\nimprove\sthe\sclarity\sof\sa\slot\sof\sdocumentation\son\sthis\spoint.
J login dgp
J mimetype text/plain
K e617e8a71a00496e9ec682caa1b4e7b5b98c55a7
U dgp
Z 8f1177e3686ad7598fec2e7c9e43c1de