summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2008-10-27 19:08:52 (GMT)
committerdgp <dgp@noemail.net>2008-10-27 19:08:52 (GMT)
commit44ac9a9751be3694b49d86a854906e0478c8428e (patch)
tree17408e39a8b6596c02c7902eb1bd5ee2130058b1 /generic/tclEncoding.c
parent458353395a77fe0826e7431a3ca128bef1c8de8d (diff)
downloadtcl-44ac9a9751be3694b49d86a854906e0478c8428e.zip
tcl-44ac9a9751be3694b49d86a854906e0478c8428e.tar.gz
tcl-44ac9a9751be3694b49d86a854906e0478c8428e.tar.bz2
* 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 *** FossilOrigin-Name: 557645d3733ee17a26c78e37bfd3f09e9f8202d0
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c9
1 files changed, 4 insertions, 5 deletions
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;