Skip to content
Tcl Source Code Artifact [8169e8a54f]
Login

Artifact [8169e8a54f]

Artifact 8169e8a54f2500f09bea62d17c97932a6816ccca:

Ticket change [8169e8a54f] - Ticket [411825ffffffffff|411825ffff] <i>Passing list w/UTF-8 from C can fail</i> status still Open with 4 other changes by dgp on 2003-08-26 10:30:59.
D 2003-08-26T10:30:59
J icomment Logged\sIn:\sYES\s\nuser_id=80530\n\n\nI\ssee\sthe\sChangeLog\scomment\sfrom\sdkf's\spatch:\n\n\s\s\s\s\s\s\s\s*\sgeneric/tclUtil.c\s(TclNeedSpace):\sRewrote\sto\sbe\nUTF-8\saware.\n\s\s\s\s\s\s\s\s[Bug\s411825,\sbut\snot\sthat\spatch\swhich\swould\shave\nadded\sextra\n\s\s\s\s\s\s\s\sspaces\sif\sthere\swas\sa\sreal\snon-ASCII\sspace\sinvolved.\s]\n\nTrouble\shere\sis\sthat\sTcl_UniCharIsSpace()\sis\sthe\nwrong\stest.\s\sIt\sis\snot\sequivalent\sto\s\nTcl_UniCharIsAListElementTerminator()\nwhich\sis\swhat\swe\sreally\sneed\sto\stest.\s\sIn\sparticular,\nthe\s"non-breaking\sspace"\s\\u00A0\sreturns\strue\nfrom\sTcl_UniCharIsSpace(),\sbut\sis\snot\srecognized\nby\sthe\slist\sparser\sin\s[llength]\sas\sa\sseparator\sof\nlist\selements.\n\nLooks\slike\sthe\sprior\sfix\sdid\scorrect\slots\sof\serrors.\nPrior\sto\sthe\sfix,\severy\sUTF-8\ssequence\sending\nin\sthe\sbyte\s\\xA0\s(or\s\\240)\scaused\strouble\swith\nTclNeedSpace().\s\sAfter\sthe\sfix,\sonly\sthe\sUTF-8\nsequence\s\\xC2\\xA0\sis\sa\sproblem.\n\nHere's\san\sinteractive\ssequence\sin\splain\sTcl\n(no\sC\scoding\srequired)\sthat\sdemos\sthe\sremaining\nbug:\n\n%\sinterp\screate\s\\u00a0\n&#65533;\n%\sinterp\screate\s[list\s\\u00a0\sfoo]\n&#65533;\sfoo\n%\sinterp\salias\s{}\sfooset\s[list\s\\u00a0\sfoo]\sset\nfooset\n%\sinterp\starget\s{}\sfooset\n&#65533;foo\n%\s#\sJust\sto\sbe\sreally\sclear...\n%\sllength\s[interp\starget\s{}\sfooset]\n1\n\nAssigning\sto\sdkf.\s\sIf\she\sdoesn't\nhave\sit\sfixed\sby\sthe\stime\sI\sget\nto\swork\stomorrow,\swe'll\sget\sit\ndone\sthen.\n
J login dgp
J mimetype text/plain
J username dgp
K 411825ffffffffffffffffffffffffffffffffff
U dgp
Z 51c8a08c4fa6eddf5750e373c4f46e5b