summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--generic/tclEncoding.c9
2 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c2f9b8..d3c5542 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2008-10-27 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclEncoding.c: Use "iso8859-1" and not "identity"
+ as the default and original [encoding system] value. Since
+ "iso8859-1" is built in to the C source code for Tcl now, there's no
+ availability issue, and it has the good feature of "identity" that
+ we must have ("bytes in" == "bytes out") without the bad feature of
+ "identity" ("broken as designed") that makes us want to abandon it.
+ [RFE 2008609]
+ *** POTENTIAL INCOMPATIBILITY for older releases of Tclkit and
+ any other code expecting a particular value for Tcl's default
+ system encoding ***
+
2008-10-24 Pat Thoyts <patthoyts@users.sourceforge.net>
* library/http/http.tcl: Fixed a failure to read SHOUTcast streams
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 9ef937f..843d46c 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEncoding.c,v 1.64 2008/10/26 18:34:04 dkf Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.65 2008/10/27 19:08:53 dgp Exp $
*/
#include "tclInt.h"
@@ -565,9 +565,7 @@ TclInitEncodingSubsystem(void)
type.freeProc = NULL;
type.nullSize = 1;
type.clientData = NULL;
-
- defaultEncoding = Tcl_CreateEncoding(&type);
- systemEncoding = Tcl_GetEncoding(NULL, type.encodingName);
+ Tcl_CreateEncoding(&type);
type.encodingName = "utf-8";
type.toUtfProc = UtfExtToUtfIntProc;
@@ -626,7 +624,8 @@ TclInitEncodingSubsystem(void)
type.freeProc = TableFreeProc;
type.nullSize = 1;
type.clientData = dataPtr;
- Tcl_CreateEncoding(&type);
+ defaultEncoding = Tcl_CreateEncoding(&type);
+ systemEncoding = Tcl_GetEncoding(NULL, type.encodingName);
}
encodingsInitialized = 1;