Skip to content
Tcl Source Code Artifact [5cf3f854fc]
Login

Artifact [5cf3f854fc]

Artifact 5cf3f854fcabc12536a9fe25e124e682cb156cbd3a0f1c007472d42777a12a7e:

Ticket change [5cf3f854fc] - Ticket [d10d6ddf29586438|d10d6ddf29] <i>UTF-16 Unicode escapes should continue to work in version 9.0</i> status still Open with 3 other changes by apnadkarni on 2024-08-13 13:38:26.
D 2024-08-13T13:38:26.876
J icomment >\sIt\sis\sabout\smodifying\sthe\sparser\sof\sstring\sliterals\s(and\sonly\sstring\sliterals),\sto\srecognize\sa\ssyntax\sthat\swas\sunderstood\sby\sTcl\s8.6.\r\n\r\n@bhaible,\sone\smore\stime,\sparsing\sof\s\\u\ssyntax\shas\snot\schanged\sbetween\sTcl\s8.6\s(any\spatchlevel)\sand\sTcl\s9.\sYet\sanother\sexample,\r\n\r\n```\r\n%\spackage\srequire\sTcl\r\n8.6.14\r\n%\sstring\sequal\s[string\sindex\s"\\ud83d\\ude03"\s0]\s"\\ud83d"\r\n1\r\n```\r\n\r\nIf\s8.6\swas\scombining\ssurrogates\sduring\sparsing,\sthe\sabove\swould\shave\sreturned\s0.\sNevertheless,\ssince\syou\sare\sinsisting\sthat\sis\sthe\sissue,\sI\straced\sthrough\sthe\scode\sfor\s8.6\sand\s9.\sIn\sboth\sreleases,\sthe\ssequence\sis\srecognized\sin\sidentical\sfashion,\sand\sresults\sin\sgeneration\sof\sa\sstring\swith\stwo\ssurrogate\scode\spoints.\sYou\scan\scompare\sthe\scode\sin\stclParse.c\sif\syou\sare\sstill\snot\ssatisfied.\r\n\r\nFurther\sto\sillustrate\swhat\shas\sbeen\ssaid\sin\searlier\swith\sregards\sto\sthe\sissue\syou\sare\sfacing\sbeing\srelated\sto\sthe\s*output*,\sI've\smodified\sthe\stcl8\sprofile\sin\sbranch\sapn-profile-tcl8-surrogates\sto\sdo\sthe\scombining\sof\ssurrogates\son\soutput.\sHere's\sthe\sresult:\r\n\r\n```\r\n%\sfconfigure\sstdout\s-profile\stcl8\s-encoding\sutf-8\r\n%\s\sputs\s"\\ud83d\\ude03"\r\n😃\r\n```\r\n\r\nNote\suse\sof\sthe\sprofile\sto\schange\sfrom\sthe\s`strict`\sprofile.\sDoing\sthe\schange\sto\sthe\stcl8\sprofile\scould\sbe\sclassified\sas\sa\sbug\sor\sa\sRFE.\sThe\slatter\swould\srequire\sTCT\sapproval\sso\sno\sguarantees\sit\swould\sbe\sdone\s(and\sthe\scurrent\simplementation\sis\sincomplete\swith\srespect\sto\sfragmented\ssequences).\s\r\n\r\nI\salso\sdo\snot\sknow\sif\sthat\swould\smeet\syour\sneeds\sbut\sat\sleast\sI\shope\syou\sare\sconvinced\sthe\sTcl\ssyntax\sparser\sdoes\snot\shave\sto\sbe\schanged.
J login apnadkarni
J mimetype text/x-markdown
K d10d6ddf295864389294b966163a23a58b9a1e72
U apnadkarni
Z cdcb97999142b414157988b0a7f731a9