Artifacts Associated With Ticket 9b2e636361
Ticket change [c24c63b48f] (rid 132470) by jan.nijtmans on 2013-06-26 07:41:10:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Starting with Tcl 8.5 (Actually, [tip.tcl.tk/59|TIP #59]) Tcl_CreateInterp() needs the encodings to be initialized. This makes it impossible to implement a VFS using scripts. Thinking about it, it's a design error in <nowiki>TIP #59</nowiki>, but that's easy to conclude afterwards. Fixing this would prevent the need for a double TclInitSubsystems() call in tclMain.c: one in Tcl_FindExecutable(), one on Tcl_CreateInterp().
- foundin initialized to: "current: 8.5.14"
- is_private initialized to: "0"
- login: "jan.nijtmans"
- priority initialized to: "5 Medium"
- private_contact initialized to: "cd7093095d9cfcb1d94e1ac96bf5d520b20d5cd7"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "jan.nijtmans"
- subsystem initialized to: "39. Package Manager"
- title initialized to: "Tcl_CreateInterp() needs initialized encodings"
- type initialized to: "Bug"
Ticket change [407716f6e9] (rid 132475) by jan.nijtmans on 2013-06-26 07:45:05:
- assignee changed to: "aku"
- icomment: "Proposed solution in [06020a12ac]"
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [d7bca6f4dc] (rid 132512) by jan.nijtmans on 2013-06-27 09:11:52:
- icomment:
Fixed in core-8-5-branch [341f682e08] and trunk [6189063c4d], with more comments and using a Byte Array in stead of a String to store unencoded configuration values (Good suggestion by Andreas Kupries, thanks!)
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [81cf61f624] (rid 132513) by jan.nijtmans on 2013-06-27 09:16:04:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2456470.88615791"
- closer changed to: "jan.nijtmans"
- login: "jan.nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [7e0d4ab1e2] (rid 132649) by dgp on 2013-07-05 16:00:13:
- closedate changed to: "2456479.16682362"
- closer changed to: "dgp"
- icomment:
Related issue is [983509]. Reviewing the patch now. Wondering whether ProcessGlobalValue is a useful tool here.
- login: "dgp"
- mimetype: "text/plain"
Ticket change [8a7a92d0ff] (rid 132652) by dgp on 2013-07-05 16:53:26:
- closedate changed to: "2456479.20377863"
- icomment:
Yes this change is a fix for [983509] (why isn't this a link?). PGV is not helpful here. These values are stored per-interp, so a process-global thing isn't useful. So this patch is a good one. I don't think the description is as helpful as it ought to be, since the notion of "initialized encodings" covers multiple stages. The first stage is the call to TclInitEncodingSubsystem(), which is called by TclInitSubsystems() which in turn is called early by Tcl_CreateInterp(), so that level of initialization is always complete and not an issue. This means the core machinery is set up and the set of built-in encodings (identity, utf-8, unicode, iso8859-1) is ready to go. The second stage is the call to TclpSetInitialEncodings() which this patch delays until after Tcl_CreateInterp() is complete. The only thing functionally that call does is to (try to) set the value of [encoding system] to match the value it detects the environment expects it to have. Since the workings of Tcl_RegisterConfig() don't make use of the system encoding, the direct effect of that routine doesn't really matter here. The third stage is getting the [encoding dirs] search path set up to locate where the *.enc files are actually stored. This isn't done explicitly by Tcl initialization. Instead either the first [encoding dirs] command in init.tcl or the first attempt to use an encoding that is not built-in will cause the default search path to be established by the routine InitializeEncodingSearchPath(). In some embedding scenarios -- notably kit things that store *.enc in a script-powered VFS -- this default path won't be a successful one, and a later [encoding dirs $path] will need to establish a fully working encoding system. It's the third stage that's really the issue here, so I revised the Title to make that more clear.
- login: "dgp"
- mimetype: "text/plain"
- title changed to:
Tcl_CreateInterp() needs initialized encoding search path
Ticket change [710a2b7a9e] (rid 132653) by dgp on 2013-07-05 17:14:26:
- closedate changed to: "2456479.21835909"
- icomment:
All that said, I think Twylite is correct and we'd be better off doing what we can to establish that the value of CFG_ENCODING when we build Tcl is the name of one of the built-in encodings. That's already true on many platforms. That's a fairly straightforward first step toward the more radical redesign where we deny the use of CFG_ENCODING completely, and just demand conformance to a particular encoding in the built-in set, likely utf-8.
- login: "dgp"
- mimetype: "text/plain"