diff options
author | dgp <dgp@users.sourceforge.net> | 2008-10-27 19:08:53 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-10-27 19:08:53 (GMT) |
commit | 1a13bcfa51bd2ef9f1fef875680257ac38fc7e85 (patch) | |
tree | 17408e39a8b6596c02c7902eb1bd5ee2130058b1 | |
parent | e2a86ffb4d1c3d4ec5f674f22f705f13567939d8 (diff) | |
download | tcl-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 ***
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | generic/tclEncoding.c | 9 |
2 files changed, 17 insertions, 5 deletions
@@ -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; |