<i>concatenation does not make usable surrogate pairs</i> status still Pending with 3 other changes
by
.
D 2021-04-13T00:03:23.796
J icomment <i>>\sTcl\sshould\srefuse\srefuse\sto\swork\swith\ssuch\sinvalid\sdata.</i>\r\n\r\nI\shave\sseveral\squestions\sto\sthis\sstatement:\r\n<ol>\r\n<li>what\sis\sexactly\svalid\sand\sinvalid\sin\sstring\sinternal\srepresentation?</li>\r\n<li>to\swhich\stime\spoint\sexactly\sit\sbecomes\snot\svalid?\swith\sother\swords\swhen\sexactly\sit\sshould\sbe\svalidated?\sby\scall\sof\sTcl_NewStringObj?\sor\smay\sbe\sby\ssomething\slike\s[/tcl/file?ci=468035ed67ba2ad6&name=generic%2FtclCmdMZ.c&ln=2301|that]:\r\n<code><pre>\r\n\s\s\s\sTclNewObj(resultPtr);\r\n\s\s\s\sresultPtr->bytes\s=\sstring2;\r\n\s\s\s\sresultPtr->length\s=\slength2;\r\n</pre></code></li>\r\n<li>how\sexactly\sit\sis\ssupposed\sto\sbe\srefused?\sTcl_Panic\smay\sbe?</li>\r\n<li>who\sdecided\swhich\smethod\sexactly,\susing\swhich\sAPI\s(I\sknow\sEIAS,\sbut\swhich\sone\s-\sutf?,\sbyte-array?,\sunicode?)\sat\sC\sor\stcl-level\smust\srefuse\sit?</li>\r\n<li>how\spracticable\sall\sthat\svalidity\sstuff\swill\sbe?\s(especially\sconsidering\sEIAS,\stype-less\stcl\sstrings,\sand\sshimmering\son\sthe\sfly)?</li>\r\n<li>and\slast\sbut\snot\sleast\swhere\sit\sis\sdocumented\sthis\sway\sand\sdoes\sit\snot\sconflict\smaybe\swith\ssome\sAPI\sprovided\sby\sTcl\smany\smany\syears\s(for\sinstance\sas\sdiscussed\sin\stclchat\sreflected\schannel\setc)?</li>\r\n</ol>\r\n\r\n<i>>\sit\sdoesn't\smatter\show\sthe\sbehaviour\sillustrated\sin\sthis\sissue\sis\s"fixed".</i>\r\n\r\nWell\sbasically\sit\sdoes.<br>\r\nOtherwise\s(if\sit\swouldn't),\swhy\sjust\snot\sleave\sit\sbackwards\scompatible?\s:)\r\n\r\nAs\sfor\sthe\shackers,\sI'm\sreally\sinterested\sto\slisten\sthe\sarguments\sfor\sthe\scase\swhy\sto\sconsider\s(an\sunpaired,\ssingle,\snon-well-formed)\sbyte\s<code>\\x80</code>\sas\san\s<code>€</code>\schar\s(via\scp1252)\sin\sinternal\sutf\srepresentation\sis\sless\shacking\sway\sas\sto\sretain\sit\sunmodified\s(as\sunpaired\ssurrogate,\sunless\sit\sbecomes\sfulfilled\sor\sit\sgets\sconverted\ssomewhere\sto\sthat\swhat\sone\swould\sexpect)?\sOr\swhy\sfor\sexample\snot\svia\ssystem\sencoding?\sOr\swhy\snot\sas\s<code>Ђ</code>\s(cp1251)?
J login sebres
J mimetype text/x-fossil-wiki
K 7f1162a8674cc65c9b72169818badc3186f97678
U sebres
Z 0b4cde4ce845a005269882b4fc59be73