D 2020-04-30T21:54:19.332
J icomment \r\nThe\ssimplest\sapproach\swould\sbe\sto\seliminate\sthe\sinternal\scalls\r\nto\sthe\sdeprecated\sroutine\sTcl_UniCharNcmp().\s\sThen\sall\scompares\r\nwould\sroute\sthrough\sthe\ssame\sroutine\sand\sget\sconsistent\sresults.\r\n\r\nTwo\sproblems\swith\sthat.\r\n\r\n1)\sThe\s"Unicode"\sinternal\srep\swas\sinvented\sbecause\sperformance\r\nof\ssome\stasks\swas\simpossibly\sterrible\swithout\sit.\sWe\srisk\sbringing\sthat\sback.\r\n\r\n2)\sWe\send\sup\swith\sa\s[string\scompare\s-length\s]\scommand\sthat\scounts\r\nits\slengths\sby\scharacters\swhile\sthings\slike\s[string\slength]\sstill\scount\r\nby\sUTF-16\sunits\swhich\smake\scombining\sthese\scommands\scorrectly\r\nquite\stricky.\s\sOnce\swe\sopen\sthis\sdoor\seven\sa\slittle\sbit,\sI\sthink\swe\swill\r\nnot\sbe\shappy\suntil\sall\slengths\sand\sindexing\soperate\son\scharacters\r\nand\snot\scode\sunits.
J login dgp
J mimetype text/plain
K 4c591fa4875b64fe29ff0c65be3902c28424797d
U dgp
Z 065fcf2b6d71ed3ea32b2a38b740c21d