diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-06-13 10:52:02 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-06-13 10:52:02 (GMT) |
| commit | c43c3f788df296e14efb6dc42d13ca3136e00bcf (patch) | |
| tree | a3b8b13ee53e1e2311da22c0e4c38945661e2874 | |
| parent | 5164ba1fe94c156c0477e09dbcdf506032cedee3 (diff) | |
| parent | f556fbe0527f88ac03ab5a132a38cf2a6d1accd4 (diff) | |
| download | tcl-c43c3f788df296e14efb6dc42d13ca3136e00bcf.zip tcl-c43c3f788df296e14efb6dc42d13ca3136e00bcf.tar.gz tcl-c43c3f788df296e14efb6dc42d13ca3136e00bcf.tar.bz2 | |
Fix [1d26e580cf]: safe interp can't source files with BOM
| -rw-r--r-- | library/safe.tcl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/safe.tcl b/library/safe.tcl index e7044f8..7a8fcdb 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -991,6 +991,10 @@ proc ::safe::AliasSource {child args} { ::interp eval $child [list info script $file] } msg opt] if {$code == 0} { + # See [Bug 1d26e580cf] + if {[string index $contents 0] eq "\uFEFF"} { + set contents [string range $contents 1 end] + } set code [catch {::interp eval $child $contents} msg opt] set replacementMsg $msg } |
