stop use of identity encoding during startup
Closed / Accepted2006809fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-06-30 13:59:09
I suspect we can use the binary encoding instead now, and take a big step toward getting rid of identity altogether.
dkfplain2008-06-30 21:06:12
Logged In: YES user_id=79902 Originator: NO We've got a guarantee that iso8859-1 is baked in.
dgpplain2008-06-30 21:28:35
Logged In: YES user_id=80530 Originator: YES Right. That's what makes this pursuit feasible.
dgpplain2008-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
jenglishplain2008-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).
dkfplain2008-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. ;-)
dgpplain2008-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?
patthoytsplain2008-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 Closed ticket [2006809fff].
[History diff]2008-10-28 02:09:23
Log in (anonymous is fine) to add a comment.
Attachments:
- 2006809.patch [download] added by dgp on 2008-10-24 03:35:58. [details]