summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--doc/encoding.n20
2 files changed, 17 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 1565aaa..111bd69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-24 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+
+ * doc/encoding.n: Corrected the docs to say that [source] uses the
+ system encoding, which it always did anyway (since 8.1) [Bug 742100]
+
2003-06-23 Vince Darley <vincentdarley@users.sourceforge.net>
* generic/tclFCmd.c: fix to bad error message when trying to
diff --git a/doc/encoding.n b/doc/encoding.n
index 5fad056..f2ddbb7 100644
--- a/doc/encoding.n
+++ b/doc/encoding.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: encoding.n,v 1.3 2000/09/07 14:27:47 poenitz Exp $
+'\" RCS: @(#) $Id: encoding.n,v 1.3.18.1 2003/06/24 21:24:08 dkf Exp $
'\"
.so man.macros
.TH encoding n "8.1" Tcl "Tcl Built-In Commands"
@@ -59,13 +59,17 @@ characters as singe bytes and Japanese characters as two bytes. This
makes it easy to embed literal strings that correspond to non-ASCII
characters by simply typing the strings in place in the script.
However, because the \fBsource\fR command always reads files using the
-ISO8859-1 encoding, Tcl will treat each byte in the file as a separate
-character that maps to the 00 page in Unicode. The
-resulting Tcl strings will not contain the expected Japanese
-characters. Instead, they will contain a sequence of Latin-1
-characters that correspond to the bytes of the original string. The
-\fBencoding\fR command can be used to convert this string to the
-expected Japanese Unicode characters. For example,
+current system encoding, Tcl will only source such files correctly
+when the encoding used to write the file is the same. This tends not
+to be true in an internationalized setting. For example, if such a
+file was sourced in North America (where the ISO8859-1 is normally
+used), each byte in the file would be treated as a separate character
+that maps to the 00 page in Unicode. The resulting Tcl strings will
+not contain the expected Japanese characters. Instead, they will
+contain a sequence of Latin-1 characters that correspond to the bytes
+of the original string. The \fBencoding\fR command can be used to
+convert this string to the expected Japanese Unicode characters. For
+example,
.CS
set s [encoding convertfrom euc-jp "\\xA4\\xCF"]
.CE