diff options
author | andreas_kupries <akupries@shaw.ca> | 2008-03-18 18:14:56 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2008-03-18 18:14:56 (GMT) |
commit | 6b95d3e5eb8086185b29be9df9f1ecf1661c3db6 (patch) | |
tree | da22989bd106f14be65df0e08dece1fd166fcf48 /library/tm.tcl | |
parent | e72e39c992f22b48bc2bf6daedb40198c764796a (diff) | |
download | tcl-6b95d3e5eb8086185b29be9df9f1ecf1661c3db6.zip tcl-6b95d3e5eb8086185b29be9df9f1ecf1661c3db6.tar.gz tcl-6b95d3e5eb8086185b29be9df9f1ecf1661c3db6.tar.bz2 |
* library/tm.tcl (::tcl::tm::UnknownHandler): Changed 'source' to
'source -encoding utf-8'. This fixes a portability problem of
Tcl Modules pointed out by Don Porter. By using plain 'source'
we were at the mercy of 'encoding system', making modules less
portable than they could be. The exact scenario: A writes a TM
in some weird encoding which is A's system encoding, distributes
it, and somewhere else it cannot be read/used because the system
encoding is different. Forcing the use of utf-8 makes the module
portable.
***INCOMPATIBILITY*** for all Tcl Modules already written in
non-utf-8 compatible encodings.
Diffstat (limited to 'library/tm.tcl')
-rw-r--r-- | library/tm.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/tm.tcl b/library/tm.tcl index baf3667..aee74f5 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -254,7 +254,7 @@ proc ::tcl::tm::UnknownHandler {original name args} { # means something else without the namespace # specifier. - package ifneeded $pkgname $pkgversion [::list source $file] + package ifneeded $pkgname $pkgversion [::list source -encoding utf-8 $file] # We abort in this unknown handler only if we got # a satisfying candidate for the requested |