.
D 2001-12-15T03:18:08
J icomment Logged\sIn:\sYES\s\nuser_id=7549\n\nWei,\n\nAs\sa\sfinal\snote,\sTcl_CreateObjCommand()\sis\smuch\sprefered\sto\s\nTcl_CreateCommand().\s\sI'm\sonly\sassuming\syou\sare\susing\s\nTcl_CreateCommand()\sas\sI\shad\sa\ssimilar\sissue\sonce.\n\nIf\syou\sare\susing\sTcl_CreateObjCommand()\salready,\syes,\syou\s\nwill\sneed\sto\sprepare\sthe\sstring\seach\sand\severy\stime\swith\s\nTcl_UtfToExternalDString()\sas\sstrings\sinternally\sto\sTcl\sare\s\nmeant\sto\sbe\sin\sneutral\sUTF-8.\n\nfor\s(i\s=\s0;\si\s<\sobjc;\si++)\s{\s\n...\nTcl_ExternalToUtfDString(NULL,objv[i]->bytes,objv\s\n[i]->length,&ds);\n...\n}\n\nIn\syour\spatch,\slooping\sover\sthe\sobjv\sarray\sand\stwiddling\s\nwith\sthe\sbytes\sdirectly\sassumes\seach\sobj\shas\sa\svalid\sstring\s\nrep\sand\skind\sof\sbreaks\sthe\sTcl_Obj\sconcept.\n\nIf\syou\scould\sshow\sus\san\sexample\sof\syour\sextension\scode,\sI\s\ncould\shelp\sadvise\sa\sfix\sfor\syou.\s\sIf\syou\sare\srunning\son\s\nwindows\sonly,\syou\scould\suse\sTcl_WinUtfToTChar\sto\sprep\sthe\s\nstring.\s\sThis\swill\salso\sswitch\sto\suse\sunicode\sif\srunning\son\s\nNT.\n\nYes,\sthis\sconversion\sstuff\sis\stricky,\sbut\swell\sworth\sthe\s\neffort\sto\sget\sright.\n
J login davygrvy
J mimetype text/plain
J username davygrvy
K 414778ffffffffffffffffffffffffffffffffff
U davygrvy
Z c82894a541762a123c79c96d76b5ddd8