Artifacts Associated With Ticket ee7f99d84e8b324f
Ticket change [185b57a806] (rid 167567) by anonymous29 on 2018-11-19 17:37:37:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi, I am upgrading tcl from tcl8.4.13 to tcl8.6.8. there is proc which translate translate TCL code for use. and then translated code used by perl script. like below proc source called for (-encoding utf-8 tcl8.6.8/library/clock.tcl). Will translate TCL code for use translate_then_source: calling > translate_tcl.pl {-encoding utf-8 tcl8.6.8/library/clock.tcl} Am i not using correct encoding method or any other issue ?? Thanks, Arvind - is_private initialized to: "0"
- login: "anonymous29"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous29"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to: "unable to execute tcl/library/clock.tcl file"
- type initialized to: "Bug"
Ticket change [9d39f74a2e] (rid 167568) by sebres on 2018-11-19 18:18:04:
- closedate changed to: "2458442.26255745"
- closer changed to: "sebres"
- icomment:
Command "source" accepts options now, thus can be used with 1 and 3 arguments: <code><pre style="padding-left:10pt"> source fileName source -encoding encodingName fileName </pre></code> Your perl script seems to parse source-command incorrectly if found "source" command that has 3 args, so it does not wrap it correctly. BTW. proper tcl "wrapper-template" for source (that simply ignore encoding param) looks like: <code><pre style="padding-left:10pt"> proc ::source {args} { set fn [lindex $args end] puts "proc source called for ($fn)" } </pre></code> Additionally note, that if your script evaluates Tcl-scripts and somewhere within "clock" ensemble is used, it may auto-load library/clock.tcl using "source" command (lazy loading on demand). You can avoid it also, if you call "clock format 0" before you create your own resp. overwrite it with own wrapper for the "source" command. Thus closed as 3rd party issue. - login: "sebres"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Invalid"
- status changed to: "Closed"