diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/auto.tcl | 4 | ||||
-rw-r--r-- | library/init.tcl | 2 | ||||
-rw-r--r-- | library/msgcat/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/opt/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/package.tcl | 4 | ||||
-rw-r--r-- | library/platform/pkgIndex.tcl | 4 | ||||
-rw-r--r-- | library/platform/shell.tcl | 4 | ||||
-rw-r--r-- | library/safe.tcl | 4 | ||||
-rw-r--r-- | library/tcltest/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/tcltest/tcltest.tcl | 4 |
10 files changed, 16 insertions, 16 deletions
diff --git a/library/auto.tcl b/library/auto.tcl index 9aa4da3..30e0060 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -202,7 +202,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # source command, but no file exists command if {[interp issafe] || [file exists $file]} { - if {![catch {uplevel #0 [list source $file]} msg opts]} { + if {![catch {uplevel #0 [list source -encoding utf-8 $file]} msg opts]} { return } append errors "$file: $msg\n" @@ -307,7 +307,7 @@ proc auto_mkindex_old {dir args} { if {[regexp {^proc[ ]+([^ ]*)} $line match procName]} { set procName [lindex [auto_qualify $procName "::"] 0] append index "set [list auto_index($procName)]" - append index " \[list source \[file join \$dir [list $file]\]\]\n" + append index " \[list source -encoding utf-8 \[file join \$dir [list $file]\]\]\n" } } close $f diff --git a/library/init.tcl b/library/init.tcl index 010dee5..f5d762c 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -430,7 +430,7 @@ proc auto_load_index {} { set dir [lindex $auto_path $i] set f "" if {$issafe} { - catch {source [file join $dir tclIndex]} + catch {source -encoding utf-8 [file join $dir tclIndex]} } elseif {[catch {set f [open [file join $dir tclIndex]]}]} { continue } else { diff --git a/library/msgcat/pkgIndex.tcl b/library/msgcat/pkgIndex.tcl index 18bd71b..e141c67 100644 --- a/library/msgcat/pkgIndex.tcl +++ b/library/msgcat/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.7-]} {return} -package ifneeded msgcat 1.7.1 [list source [file join $dir msgcat.tcl]] +package ifneeded msgcat 1.7.1 [list source -encoding utf-8 [file join $dir msgcat.tcl]] diff --git a/library/opt/pkgIndex.tcl b/library/opt/pkgIndex.tcl index c763a3d..aad00af 100644 --- a/library/opt/pkgIndex.tcl +++ b/library/opt/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.5-]} {return} -package ifneeded opt 0.4.9 [list source [file join $dir optparse.tcl]] +package ifneeded opt 0.4.9 [list source -encoding utf-8 [file join $dir optparse.tcl]] diff --git a/library/package.tcl b/library/package.tcl index 2d72a7c..cc32531 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -291,7 +291,7 @@ proc pkg_mkIndex {args} { set ::tcl::type load } else { set ::tcl::debug sourcing - source [file join $::tcl::dir $::tcl::file] + source -encoding utf-8 [file join $::tcl::dir $::tcl::file] set ::tcl::type source } @@ -442,7 +442,7 @@ proc tclPkgSetup {dir pkg version files} { if {$type eq "load"} { set auto_index($cmd) [list load [file join $dir $f] $pkg] } else { - set auto_index($cmd) [list source [file join $dir $f]] + set auto_index($cmd) [list source -encoding utf-8 [file join $dir $f]] } } } diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index e7029d0..4526c7e 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.19 [list source [file join $dir platform.tcl]] -package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] +package ifneeded platform 1.0.19 [list source -encoding utf-8 [file join $dir platform.tcl]] +package ifneeded platform::shell 1.1.4 [list source -encoding utf-8 [file join $dir shell.tcl]] diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl index 1e43409..60d5b37 100644 --- a/library/platform/shell.tcl +++ b/library/platform/shell.tcl @@ -31,7 +31,7 @@ proc ::platform::shell::generic {shell} { # conflict with this one. lappend code {package forget platform} # Inject our platform package - lappend code [list source $base] + lappend code [list source -encoding utf-8 $base] # Query and print the architecture lappend code {puts [platform::generic]} # And done @@ -56,7 +56,7 @@ proc ::platform::shell::identify {shell} { # conflict with this one. lappend code {package forget platform} # Inject our platform package - lappend code [list source $base] + lappend code [list source -encoding utf-8 $base] # Query and print the architecture lappend code {puts [platform::identify]} # And done diff --git a/library/safe.tcl b/library/safe.tcl index 7b85371..d43eef1 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -625,14 +625,14 @@ proc ::safe::InterpInit { # other procedures defined: if {[catch {::interp eval $child { - source [file join $tcl_library init.tcl] + source -encoding utf-8 [file join $tcl_library init.tcl] }} msg opt]} { Log $child "can't source init.tcl ($msg)" return -options $opt "can't source init.tcl into child $child ($msg)" } if {[catch {::interp eval $child { - source [file join $tcl_library tm.tcl] + source -encoding utf-8 [file join $tcl_library tm.tcl] }} msg opt]} { Log $child "can't source tm.tcl ($msg)" return -options $opt "can't source tm.tcl into child $child ($msg)" diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl index 2fff5f4..9f51e64 100644 --- a/library/tcltest/pkgIndex.tcl +++ b/library/tcltest/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.5-]} {return} -package ifneeded tcltest 2.5.8 [list source [file join $dir tcltest.tcl]] +package ifneeded tcltest 2.5.8 [list source -encoding utf-8 [file join $dir tcltest.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 12b0976..2fc5838 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -2923,7 +2923,7 @@ proc tcltest::runAllTests { {shell ""} } { if {[singleProcess]} { if {[catch { incr numTestFiles - uplevel 1 [list ::source $file] + uplevel 1 [list ::source -encoding utf-8 $file] } msg]} { puts [outputChannel] "Test file error: $msg" # append the name of the test to a list to be reported @@ -3008,7 +3008,7 @@ proc tcltest::runAllTests { {shell ""} } { puts [outputChannel] [string repeat ~ 44] puts [outputChannel] "$dir test began at [eval $timeCmd]\n" - uplevel 1 [list ::source [file join $directory all.tcl]] + uplevel 1 [list ::source -encoding utf-8 [file join $directory all.tcl]] set endTime [eval $timeCmd] puts [outputChannel] "\n$dir test ended at $endTime" |