summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--library/tm.tcl2
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9219be8..c43d727 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-03-18 Andreas Kupries <andreask@activestate.com>
+
+ * 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.
+
2008-03-18 Don Porter <dgp@users.sourceforge.net>
* generic/tclExecute.c: Patch from Miguel Sofer to correct the
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