Tcl Source Code

View Ticket
Login
Ticket UUID: 2006809
Title: stop use of identity encoding during startup
Type: RFE Version: None
Submitter: dgp Created on: 2008-06-30 13:59:09
Subsystem: 10. Objects Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2008-10-28 02:09:23
Resolution: Accepted Closed By: dgp
    Closed on: 2008-10-27 19:09:23
Description:
I suspect we can use the binary
encoding instead now, and take
a big step toward getting rid
of identity altogether.
User Comments: patthoyts added on 2008-10-25 00:48:15:
This doesn't appear to introduce any problems for tclkit. We recently changed kitInit to make use of Tcl_GetEncodingNameFromEnvironment to set the encoding and extended the core set of encodings included to match those found in basekits which cover most non-asian systems. So only on a system where the environment encoding isnt available in the vfs will the system encoding be set to the default introduced by this patch - which seems to be iso8859-1.

dgp added on 2008-10-24 21:52:45:
This change might have an
impact on Tclkit's startup
sequence, since I think it
uses [encoding system] eq "identity"
as a test for "I'm stuck with
Tcl's original encoding guess".

Anyone available to try Tclkit
with this patch in place?

dkf added on 2008-10-24 12:32:02:
"iso8859-1" is the encoding name (and consists of an encoding that is special in that it will not choke or shuffle around any input data). "binary" is not actually an encoding, but rather magic that switches the I/O system to work with bytearrays instead of strings. :-)

Patch is correct (I've stared at that code recently enough to work it out). Patch would be more correct if it didn't leave things commented out. That's what we have 'cvs diff' for. ;-)

jenglish added on 2008-10-24 06:50:31:
Don't quite yet grok what the patch is doing or how it's doing it, but the intent is eminently reasonable.  "binary" as the system default encoding is a much better choice than "identity" (which, as noted, is broken-as-designed).

dgp added on 2008-10-24 03:35:58:

File Added - 298639: 2006809.patch


Here's a dead simple patch
that does this.  Changes
the default and original
system encoding to iso8859-1,
that is, binary, instead of
the broken-as-designed "identity".


File Added: 2006809.patch

dgp added on 2008-06-30 21:28:35:
Logged In: YES 
user_id=80530
Originator: YES


Right.  That's what makes this
pursuit feasible.

dkf added on 2008-06-30 21:06:12:
Logged In: YES 
user_id=79902
Originator: NO

We've got a guarantee that iso8859-1 is baked in.

Attachments: