summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/auto.tcl4
-rw-r--r--library/init.tcl2
-rw-r--r--library/msgcat/pkgIndex.tcl2
-rw-r--r--library/opt/pkgIndex.tcl2
-rw-r--r--library/package.tcl4
-rw-r--r--library/platform/pkgIndex.tcl4
-rw-r--r--library/platform/shell.tcl4
-rw-r--r--library/safe.tcl4
-rw-r--r--library/tcltest/pkgIndex.tcl2
-rw-r--r--library/tcltest/tcltest.tcl4
-rw-r--r--tests-perf/chan.perf.tcl2
-rw-r--r--tests-perf/clock.perf.tcl2
-rw-r--r--tests-perf/list.perf.tcl2
-rw-r--r--tests-perf/timer-event.perf.tcl2
-rw-r--r--tests/internals.tcl4
-rw-r--r--tests/pkgIndex.tcl2
-rwxr-xr-xtools/makeTestCases.tcl2
-rw-r--r--unix/Makefile.in6
-rw-r--r--win/Makefile.in4
-rw-r--r--win/makefile.vc4
-rw-r--r--win/tclsh.exe.manifest.in4
21 files changed, 31 insertions, 35 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"
diff --git a/tests-perf/chan.perf.tcl b/tests-perf/chan.perf.tcl
index 2ef87cb..56acccf 100644
--- a/tests-perf/chan.perf.tcl
+++ b/tests-perf/chan.perf.tcl
@@ -17,7 +17,7 @@
if {![namespace exists ::tclTestPerf]} {
- source [file join [file dirname [info script]] test-performance.tcl]
+ source -encoding utf-8 [file join [file dirname [info script]] test-performance.tcl]
}
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index b55c851..8e877ac 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -22,7 +22,7 @@ if {[info exists ::argv0] && [file tail $::argv0] eq [file tail [info script]]}
## common test performance framework:
if {![namespace exists ::tclTestPerf]} {
- source [file join [file dirname [info script]] test-performance.tcl]
+ source -encoding utf-8 [file join [file dirname [info script]] test-performance.tcl]
}
namespace eval ::tclTestPerf-TclClock {
diff --git a/tests-perf/list.perf.tcl b/tests-perf/list.perf.tcl
index 121a922..564fad0 100644
--- a/tests-perf/list.perf.tcl
+++ b/tests-perf/list.perf.tcl
@@ -17,7 +17,7 @@
if {![namespace exists ::tclTestPerf]} {
- source [file join [file dirname [info script]] test-performance.tcl]
+ source -encoding utf-8 [file join [file dirname [info script]] test-performance.tcl]
}
diff --git a/tests-perf/timer-event.perf.tcl b/tests-perf/timer-event.perf.tcl
index 5d1d3c6..e2525d1 100644
--- a/tests-perf/timer-event.perf.tcl
+++ b/tests-perf/timer-event.perf.tcl
@@ -17,7 +17,7 @@
if {![namespace exists ::tclTestPerf]} {
- source [file join [file dirname [info script]] test-performance.tcl]
+ source -encoding utf-8 [file join [file dirname [info script]] test-performance.tcl]
}
diff --git a/tests/internals.tcl b/tests/internals.tcl
index 36dbc90..ff68c0f 100644
--- a/tests/internals.tcl
+++ b/tests/internals.tcl
@@ -2,7 +2,7 @@
#
# Source this file in the related tests to include from tcl-tests:
#
-# source [file join [file dirname [info script]] internals.tcl]
+# source -encoding utf-8 [file join [file dirname [info script]] internals.tcl]
#
# Copyright © 2020 Sergey G. Brester (sebres).
#
@@ -93,4 +93,4 @@ namespace export test*
# for script path & as mark for loaded
proc scriptpath {} [list return [info script]]
-}}; # end of internals. \ No newline at end of file
+}}; # end of internals.
diff --git a/tests/pkgIndex.tcl b/tests/pkgIndex.tcl
index 96542f9..0f3bf49 100644
--- a/tests/pkgIndex.tcl
+++ b/tests/pkgIndex.tcl
@@ -1,3 +1,3 @@
#! /usr/bin/env tclsh
-package ifneeded tcltests 0.1 [list source $dir/tcltests.tcl] \ No newline at end of file
+package ifneeded tcltests 0.1 [list source -encoding utf-8 $dir/tcltests.tcl]
diff --git a/tools/makeTestCases.tcl b/tools/makeTestCases.tcl
index 70213e0..1eae645 100755
--- a/tools/makeTestCases.tcl
+++ b/tools/makeTestCases.tcl
@@ -4,7 +4,7 @@
package require msgcat
set d [file dirname [file dirname [info script]]]
puts "getting transition data from [file join $d library tzdata America Detroit]"
-source [file join $d library/tzdata/America/Detroit]
+source -encoding utf-8 [file join $d library/tzdata/America/Detroit]
namespace eval ::tcl::clock {
::msgcat::mcmset en_US_roman {
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 4a2c395..9249178 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -927,7 +927,7 @@ runtest: ${TCLTEST_EXE}
# Useful target for running the test suite with an unwritable current
# directory...
ro-test: ${TCLTEST_EXE}
- echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./${TCLTEST_EXE}
+ echo 'exec chmod -w .;package require tcltest;tcltest::temporaryDirectory /tmp;source -encoding utf-8 ../tests/all.tcl;exec chmod +w .' | $(SHELL_ENV) ./${TCLTEST_EXE}
# The following target generates the shared libraries in dltest/ that are used
# for testing; they are included as part of the "tcltest" target (via the
@@ -2152,10 +2152,10 @@ $(GENERIC_DIR)/tclOOScript.h: $(TOOL_DIR)/tclOOScript.tcl
@echo "This warning can be safely ignored, do not report as a bug!"
genstubs:
- $(NATIVE_TCLSH) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \
+ $(NATIVE_TCLSH) -encoding utf-8 $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \
$(GENERIC_DIR)/tcl.decls $(GENERIC_DIR)/tclInt.decls \
$(GENERIC_DIR)/tclTomMath.decls
- $(NATIVE_TCLSH) $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \
+ $(NATIVE_TCLSH) -encoding utf-8 $(TOOL_DIR)/genStubs.tcl $(GENERIC_DIR) \
$(GENERIC_DIR)/tclOO.decls
genscript:
diff --git a/win/Makefile.in b/win/Makefile.in
index e71c5f3..f9d4e61 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -1100,12 +1100,12 @@ $(GENERIC_DIR)/tclStubInit.c: $(GENERIC_DIR)/tcl.decls \
@echo "This warning can be safely ignored, do not report as a bug!"
genstubs:
- $(TCL_EXE) "$(ROOT_DIR_NATIVE)/tools/genStubs.tcl" \
+ $(TCL_EXE) -encoding utf-8 "$(ROOT_DIR_NATIVE)/tools/genStubs.tcl" \
"$(GENERIC_DIR_NATIVE)" \
"$(GENERIC_DIR_NATIVE)/tcl.decls" \
"$(GENERIC_DIR_NATIVE)/tclInt.decls" \
"$(GENERIC_DIR_NATIVE)/tclTomMath.decls"
- $(TCL_EXE) "$(ROOT_DIR_NATIVE)/tools/genStubs.tcl" \
+ $(TCL_EXE) -encoding utf-8 "$(ROOT_DIR_NATIVE)/tools/genStubs.tcl" \
"$(GENERIC_DIR_NATIVE)" \
"$(GENERIC_DIR_NATIVE)/tclOO.decls"
diff --git a/win/makefile.vc b/win/makefile.vc
index 8720b66..d2b2a69 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -707,10 +707,10 @@ genstubs:
!if !exist($(TCLSH))
@echo Build tclsh first!
!else
- $(TCLSH) $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \
+ $(TCLSH) -encoding utf-8 $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \
$(GENERICDIR:\=/)/tcl.decls $(GENERICDIR:\=/)/tclInt.decls \
$(GENERICDIR:\=/)/tclTomMath.decls
- $(TCLSH) $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \
+ $(TCLSH) -encoding utf-8 $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \
$(GENERICDIR:\=/)/tclOO.decls
!endif
diff --git a/win/tclsh.exe.manifest.in b/win/tclsh.exe.manifest.in
index dc652e6..dd8a7c5 100644
--- a/win/tclsh.exe.manifest.in
+++ b/win/tclsh.exe.manifest.in
@@ -35,10 +35,6 @@
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
- <asmv3:windowsSettings
- xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">
- <activeCodePage>UTF-8</activeCodePage>
- </asmv3:windowsSettings>
</asmv3:application>
<dependency>
<dependentAssembly>