.
D 2008-08-16T09:24:48
J icomment Logged\sIn:\sNO\s\n\nWith\sthe\scurrent\sTcl/Tk\sHEAD\sas\sof\stoday:\n\nThere\smay\sbe\s2\sbugs\shere.\s\s1\sseems\sto\sbe\sthat\sthe\sTkTextIndex\s(both\sof\sthem\sfor\sthe\s[.t\sget])\s->linePtr\sare\sthe\ssame\sfor\severy\siteration,\sand\sthe\sother\sis\sthat\sthe\sbyteIndex\sadvances\swhen\sit's\ssupposed\sto\sbe\sa\sdisplay\sline\sadvancement.\n\nI\sadded\sthis\sto\sjust\sbefore\sthe\sTextGetText()\scall\sin\sthe\sTEXT_GET\spath:\nprintf("index1Ptr->linePtr\s%p\sindex1Ptr->byteIndex\s%d\\n",\s(void\s*)index1Ptr->linePtr,\sindex1Ptr->byteIndex);\nprintf("index2Ptr->linePtr\s%p\sindex2Ptr->byteIndex\s%d\\n",\s(void\s*)index2Ptr->linePtr,\sindex2Ptr->byteIndex);\s\n\n...\nTcl_Obj\s*get\s=\sTextGetText(textPtr,\sindex1Ptr,\sindex2Ptr,\svisible);\n\nThen\sI\sadded\sthis\sbit\sof\scode:\s\s\n\s{\n\schar\s*p;\n\sint\slen;\n\sp\s=\sTcl_GetStringFromObj(get,\s&len);\n\sprintf("length\s%d\\n%s\\n",\slen,\sp);\n\sprintf("p[0]\s=\s%x\\n",\sp[0]\s&\s0xff);\n\s}\s\n\n\sindex1Ptr->linePtr\s0x820aca0\sindex1Ptr->byteIndex\s63\n\sindex2Ptr->linePtr\s0x820aca0\sindex2Ptr->byteIndex\s63\n\n\sindex1Ptr->linePtr\s0x820aca0\sindex1Ptr->byteIndex\s64\n\sindex2Ptr->linePtr\s0x820aca0\sindex2Ptr->byteIndex\s65\s\n\slength\s1\s\n\n\sp[0]\s=\sc3\s\n\nThat's\sthe\sonly\spoint\sthat\sit\shas\sa\sbyteIndex\s>\s0,\sand\sthat's\swhen\sit\sproduces\sthe\serror\sin\sthe\sputs\spath.\s\sFrom\swhat\sI've\sread\s0xc3\sis\snot\sa\svalid\sUTF-8\scharacter.\s\s0xC3,0x83\son\sthe\sother\shand\smight\sbe.\s\sI'm\snot\ssure\swhether\sthe\sbug\sis\sin\sGetIndex\sof\sthe\stext\swidget\s(which\sreturns\sthe\sinvalid\sbyteIndex)\sor\sTextGetText\s--\sthey\sboth\smay\shave\sbugs.\n\n
J login [email protected]
J mimetype text/plain
J username [email protected]
K 1943546fffffffffffffffffffffffffffffffff
U nobody
Z 9b869d4b06686e435d81886e093e9cfb