Skip to content
Tcl Source Code Artifact [8f73e96130]
Login

Artifact [8f73e96130]

Artifact 8f73e96130e0cae5af24e0fbe70be55ce97519acf3dac9d0416e81bffa2add9f:

Ticket change [8f73e96130] - Pending ticket [debd088e48998a75|debd088e48]: <i>llength split is different from string length</i> plus 5 other changes by jan.nijtmans on 2021-02-12 07:25:25.
D 2021-02-12T07:25:25.546
J assignee jan.nijtmans
J icomment This\schange\sis\smade\son\spurpose:\sWhen\sa\shigh\ssurrogate\sis\sfollowed\sby\sa\slow\ssurrogate,\sthose\stwo\sform\sa\ssingle\scharacter\s(like\san\semoji).\sSo,\sthey\sare\snot\ssupposed\sto\sbe\ssplitted,\sever.\sBut\sin\sTcl\s8.6,\sthe\sinternal\srepresentation\sof\sstrings\sis\sin\sUTF-16,\sso\ssuch\scharacters\sstill\shave\sa\slength\s2\s(that\swill\sbe\sfixed\sin\sTcl\s9.0).\r\n\r\nJust\scurious\swhat\sproblem\sthis\scauses\sin\syour\sapplication.\sSince\s8.7\shas\seven\smore\scode\sto\smake\ssure\sthat\semoji\scannot\sbe\ssplitted,\syour\sapplication\swill\sbreak\sanyway\swhen\smaking\sthe\sswitch\sto\s8.7.\sMost\slikely\syou\sshould\shave\sused\sthe\s"unicode"\sencoder\sto\sconvert\sthe\sstring\sto\sUTF-16\scharacters,\sand\sthen\sdo\smore\sprocessing\sfrom\sthere,\sinstead\sof\susing\s"split",\sbut\swithout\slooking\sat\syour\sapplication\sit's\shard\sto\ssay.\r\n\r\nThanks!
J login jan.nijtmans
J mimetype text/x-fossil-wiki
J resolution Wont\sFix
J status Pending
K debd088e48998a758f2927b67c132341954428ea
U jan.nijtmans
Z ba1ddec538d9abbaec0b471b12373656