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 | d121b996947ccd84be001ecffceebeb1dfa88de3 (patch) | |
tree | a3b8b13ee53e1e2311da22c0e4c38945661e2874 /library/safe.tcl | |
parent | e80a9647f5b435daaa052bbe487314a47794fdca (diff) | |
parent | e4a0bd43132f37661c7177534ec26a6c34a2cb9d (diff) | |
download | tcl-d121b996947ccd84be001ecffceebeb1dfa88de3.zip tcl-d121b996947ccd84be001ecffceebeb1dfa88de3.tar.gz tcl-d121b996947ccd84be001ecffceebeb1dfa88de3.tar.bz2 |
Fix [1d26e580cf]: safe interp can't source files with BOM
Diffstat (limited to 'library/safe.tcl')
-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 } |