summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-10-27 19:08:53 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-10-27 19:08:53 (GMT)
commit1a13bcfa51bd2ef9f1fef875680257ac38fc7e85 (patch)
tree17408e39a8b6596c02c7902eb1bd5ee2130058b1 /generic/tclEncoding.c
parente2a86ffb4d1c3d4ec5f674f22f705f13567939d8 (diff)
downloadtcl-1a13bcfa51bd2ef9f1fef875680257ac38fc7e85.zip
tcl-1a13bcfa51bd2ef9f1fef875680257ac38fc7e85.tar.gz
tcl-1a13bcfa51bd2ef9f1fef875680257ac38fc7e85.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 ***
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;