Skip to content
Tcl Source Code Artifact [a3f64d7dc9]
Login

Artifact [a3f64d7dc9]

Artifact a3f64d7dc98fabf271496cb2b433ebd294df022be9f56e99467a2ce6e04b4bfa:

Ticket change [a3f64d7dc9] - Ticket [7f1162a8674cc65c|7f1162a867] <i>concatenation does not make usable surrogate pairs</i> status still Pending with 3 other changes by jan.nijtmans on 2021-04-13 06:33:48.
D 2021-04-13T06:33:48.491
J icomment >\swhat\sis\sexactly\svalid\sand\sinvalid\sin\sstring\sinternal\srepresentation?\r\n\r\nIn\sTcl\s8.6,\sthe\sinternal\srepresentation\sis\s(modified)\s[https://en.wikipedia.org/wiki/CESU-8|CESU-8].\sIn\sTcl\s8.7\sthis\schanged\sto\s(modified)\s[https://simonsapin.github.io/wtf-8/|WTF-8].\sThe\sonly\sdifference\sbetween\sthose\stwo\sis\swhen\shandling\scharacters\s>\sU+FFFF.\r\n\r\nTcl\s8.6\sany\sincorrect\sbyte\sis\sinterpreted\sas\sISO-8859-1.\sIn\sTcl\s8.7\sthis\schanged\sto\sCP1252,\swhich\sis\salmost\sthe\ssame,\sexcept\sfor\sbytes\sin\sthe\srance\s0x80-0x9F.\sSee\s[https://core.tcl-lang.org/tips/doc/trunk/tip/389.md|TIP\s#389]\r\n\r\n>\sto\swhich\stime\spoint\sexactly\sit\sbecomes\snot\svalid?\r\n\r\nThe\serror-correction\sis\sbuilt\sinto\sthe\sfunction\sTcl_UtfToUniChar().\sSo\swhenever\sthe\sstring\sis\sinterpreted\sas\s(unicode)\scode\spoints\sinstead\sof\sbytes.\r\n\r\n>\squestion\s3-6\s...\r\n\r\nWhen\sI\swrote\sTIP\s#389,\sI\sdidn't\srealize\sthat\swhat's\sdescribed\sthere\sis\sactually\sWTF-8.\sSo\sthe\sabove\s3\slinks\sshould\sgive\syou\severything\syou\sneed\sto\sunderstand\sthis.
J login jan.nijtmans
J mimetype text/x-fossil-wiki
K 7f1162a8674cc65c9b72169818badc3186f97678
U jan.nijtmans
Z 9a58866617776648a06e26b10e2e88e6