summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-06-24 21:24:08 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-06-24 21:24:08 (GMT)
commit0b3bcf782c99fda3becd1a089c4bc3265f0cddaa (patch)
tree4663ca3768d9dc07512ba08afb3e9e27123d63cc
parentb2119b24ffca4e1a1c74f423a02377dc04c323d8 (diff)
downloadtcl-0b3bcf782c99fda3becd1a089c4bc3265f0cddaa.zip
tcl-0b3bcf782c99fda3becd1a089c4bc3265f0cddaa.tar.gz
tcl-0b3bcf782c99fda3becd1a089c4bc3265f0cddaa.tar.bz2
Documented that [source] always uses the system encoding.
-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