Artifacts Associated With Ticket 218100
Ticket change [55c70c987c] (rid 94207) by nobody on 2000-10-26 00:53:09:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1803 Bug Version: 8.1b3 SubmitDate: '1999-04-14' LastModified: '2000-04-03' Severity: SER Status: Closed Submitter: pat ChangedBy: hobbs OS: Windows 95 Machine: X86 FixedDate: '2000-10-25' ClosedDate: '2000-04-03' Name: Di Yu Comments: This is a very bad problem as it makes the compilation of programs containing Chinese words virtually impossible. I don't know why Tcl_Eval think the string is 5-bytes with the third one as Unicode \u04dd, and not 6-bytes as the console treat it. In fact, when I try to compile a program which contains "encoding convertfrom gb2212 ...", the generated executable can hardly do any correct converting. ReproducibleScript: #include <tcl.h> void main(int argc, char **argv) { Tcl_Interp *Interp=Tcl_CreateInterp(); Tcl_Init(Interp); Tcl_Eval(Interp, "set s ÏÂ?Ìâ"); Tcl_Eval(Interp, "for {set i 0} {$i<[string length $s]} {incr i} {set c [string index $s $i]; scan $c \"%c\" code; puts [format \"%x\" $code];}"); Tcl_DeleteInterp(Interp); exit(1); } ObservedBehavior: The program, after compiled to an executable file(under Windows, using VC++5.0), gives the following result when executed: cf c2 4bb cc e2 DesiredBehavior: It should give: cf c2 d2 bb cc e2 just as the same script would give when executed in the wish console. There is slight confusion here, because the console has an implicit encoding phase the that user is ignoring. The user wants to do Tcl_ExternalToUtfDString to have this evaluate correctly, or include some other conversion step at the C level, to make up for the lack of internal recoding that the console does for us. -- 04/03/2000 hobbs - foundin initialized to: "obsolete: 8.1b3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "57. zlib"
- title initialized to:
Tcl_Eval does not treat a command the same as in the console
- type initialized to: "RFE"
Ticket change [1330537ac0] (rid 124169) by welch on 2000-10-26 08:14:47:
- closedate changed to: "2000-10-26T01:14:47"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [55b5a48618] (rid 94194) by dgp on 2001-04-06 03:33:59:
- foundin changed to: "None"
- status changed to: "Open"
- subsystem changed to: "None"
Ticket change [7bdbdd627a] (rid 96977) by dgp on 2001-04-06 03:34:43:
- closedate changed to: "2001-04-05T20:34:43"
- closer changed to: "dgp"
- status changed to: "Closed"
- subsystem changed to: "45. Parsing and Eval"