Skip to content
Tcl Source Code Artifact [55c70c987c]
Login

Artifact [55c70c987c]

Artifact 55c70c987c3798a671c30b33f7fab26ee3502cd1:

Ticket change [55c70c987c] - New ticket [218100ffffffffff|218100ffff] <i>Tcl_Eval does not treat a command the same as in the console</i>. by nobody on 2000-10-26 00:53:09.
D 2000-10-26T00:53:09
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s1803\sBug\nVersion:\s8.1b3\nSubmitDate:\s'1999-04-14'\nLastModified:\s'2000-04-03'\nSeverity:\sSER\nStatus:\sClosed\nSubmitter:\spat\nChangedBy:\shobbs\nOS:\sWindows\s95\nMachine:\sX86\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-04-03'\n\n\nName:\nDi\sYu\n\nComments:\nThis\sis\sa\svery\sbad\sproblem\sas\sit\smakes\sthe\scompilation\sof\sprograms\n\s\s\s\scontaining\sChinese\swords\svirtually\simpossible.\sI\sdon't\sknow\swhy\sTcl_Eval\n\s\s\s\sthink\sthe\sstring\sis\s5-bytes\swith\sthe\sthird\sone\sas\sUnicode\s\\u04dd,\sand\n\s\s\s\snot\s6-bytes\sas\sthe\sconsole\streat\sit.\sIn\sfact,\swhen\sI\stry\sto\scompile\sa\n\s\s\s\sprogram\swhich\scontains\s"encoding\sconvertfrom\sgb2212\s...",\sthe\sgenerated\n\s\s\s\sexecutable\scan\shardly\sdo\sany\scorrect\sconverting.\n\nReproducibleScript:\n#include\s<tcl.h>\n\s\s\s\svoid\smain(int\sargc,\schar\s**argv)\n\s\s\s\s{\n\s\s\s\s\s\s\s\sTcl_Interp\s*Interp=Tcl_CreateInterp();\n\s\s\s\s\s\s\s\sTcl_Init(Interp);\n\s\s\s\s\s\s\s\sTcl_Eval(Interp,\s"set\ss\sÏÂ?Ìâ");\n\s\s\s\s\s\s\s\sTcl_Eval(Interp,\s"for\s{set\si\s0}\s{$i<[string\slength\s$s]}\s{incr\si}\n\s\s\s\s{set\sc\s[string\sindex\s$s\s$i];\sscan\s$c\s\\"%c\\"\scode;\sputs\s[format\s\\"%x\\"\n\s\s\s\s$code];}");\n\s\s\s\s\s\s\s\sTcl_DeleteInterp(Interp);\n\s\s\s\s\s\s\s\sexit(1);\n\s\s\s\s}\n\nObservedBehavior:\nThe\sprogram,\safter\scompiled\sto\san\sexecutable\sfile(under\sWindows,\susing\n\s\s\s\sVC++5.0),\sgives\sthe\sfollowing\sresult\swhen\sexecuted:\n\s\s\s\s\n\s\s\s\scf\n\s\s\s\sc2\n\s\s\s\s4bb\n\s\s\s\scc\n\s\s\s\se2\n\nDesiredBehavior:\nIt\sshould\sgive:\n\s\s\s\s\n\s\s\s\scf\n\s\s\s\sc2\n\s\s\s\sd2\n\s\s\s\sbb\n\s\s\s\scc\n\s\s\s\se2\n\s\s\s\s\n\s\s\s\sjust\sas\sthe\ssame\sscript\swould\sgive\swhen\sexecuted\sin\sthe\swish\sconsole.\n\n\n\nThere\sis\sslight\sconfusion\shere,\sbecause\sthe\sconsole\shas\san\nimplicit\sencoding\sphase\sthe\sthat\suser\sis\signoring.\s\sThe\suser\nwants\sto\sdo\sTcl_ExternalToUtfDString\sto\shave\sthis\sevaluate\ncorrectly,\sor\sinclude\ssome\sother\sconversion\sstep\sat\sthe\sC\nlevel,\sto\smake\sup\sfor\sthe\slack\sof\sinternal\srecoding\sthat\sthe\nconsole\sdoes\sfor\sus.\s\n--\s04/03/2000\shobbs
J foundin obsolete:\s8.1b3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 57.\szlib
J title Tcl_Eval\sdoes\snot\streat\sa\scommand\sthe\ssame\sas\sin\sthe\sconsole
J type RFE
K 218100ffffffffffffffffffffffffffffffffff
U nobody
Z b1798c4fa49ba4b9d30bc0953388ad7b