Skip to content
Tcl Source Code Artifact [c68630f35b]
Login

Artifact [c68630f35b]

Artifact c68630f35b3bf3f464eec48f4136c711d0a7fff4ef775c2be95949b1a92a6b99:

Ticket change [c68630f35b] - Ticket [dd010cadfb99cee6|dd010cadfb] <i>[string trim] mishandles surrogates</i> status still Open with 3 other changes by jan.nijtmans on 2020-04-06 15:00:13.
D 2020-04-06T15:00:13.103
J icomment So\s...\sjust\sdon't\sdo\sthat\s:-)\r\n\r\n"string\strim"\sexpects\sa\sset\sof\scharacters\sas\s3th\selement.\sSince\sEmoji\sare\ssplit\sinto\s2\ssurrogates,\sit\sstarts\sremoving\smatching\ssurrogates,\sindeed\stotally\sdifferent\sas\sexpected.\r\n\r\nMy\ssuggestion:\sDon't\sallow\sEmoji\sto\sbe\sused\sin\s3th\sargument\sof\s"string\strim"\r\n\r\nThe\ssame\shappens\swhen\susing\sEmoji\sbetween\s'['\sand\s']'\sin\sregular\sexpressions.\r\n\r\nSolution:\sSwitch\sto\sTcl\s9.0.\sEnhance\sdocumentation\sof\s"string\strim"\sand\sregsub/regexp\sexplaining\sthis\sas\sknown\slimitation.
J login jan.nijtmans
J mimetype text/plain
K dd010cadfb99cee6c0a38d1bd4f4927a4945f4ec
U jan.nijtmans
Z 7bbded75566640c9161567830d77ffd8