Overview
| Artifact ID: | 3ef925ec7754fa87992501d1dab662b11ee149bf |
|---|---|
| Ticket: | 579617ffffffffffffffffffffffffffffffffff
encodings can't be found |
| User & Date: | jcw on 2002-07-10 13:09:22 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
Context: tclkit, which uses the std unix/tclAppInit.c, but overrides Tcl_AppInit (using TCL_LOCAL_APPINIT). Basic logic, from my (fragmentary) understanding: std main starts does a Tcl_FindExecutable launches custom tclkit_AppInit loads a few static extensions sets up a preinit script [1] call Tcl_Init The tclkit init code is relatively small, it's at: http://www.equi4.com/metakit/viewcvs.cgi/*checkout*/ tclkit/src/kitInit.c?rev=1.9 [1] The preinit script is the one that loads TclVFS which provides scripting access to the VFS C layer in the Tcl core. ---- Observed behavior: on Unix/Linux, "encoding system" returns "identity". UNLESS the executable is run on the build machine - THEN it find the installed encodings due to the fact that it remembers (!) a static absolute path of where the tcl8.4/ area is installed. ---- The special situation in Tclkit is that it stores encoding files inside a VFS, and that it uses a bit of Tcl scripting to set things up *before* encoding files can be accessed. Therefore the first call to Tcl_FindExecutable will not be able to get encodings right - nor even a call to Tcl_SetDefaultEncodingDir - because at least one interp has to run scripts before VFS is ready. For that reason, Tclkit includes a "librarypath" command coded in C, written by Vince Darley, which gets called from Tcl as soon as the VFS mount is in place. The code for this is a few dozen lines, see: http://www.equi4.com/metakit/viewcvs.cgi/*checkout*/ tclkit/src/pwb.c?rev=1.6 The essential calls there are: TclSetLibraryPath(Tcl_NewListObj(1,&path)); TclpSetInitialEncodings(); Tcl_FindExecutable(Tcl_GetVar(interp, "argv0", TCL_GLOBAL_ONLY)); What happens, is that Tcl_FindeExecutable gets called a second time - not sure why this is needed. Any help on this issue would be greatly appreciated - I'm sort of way beyond my understanding of how things work or could be made to work... Perhaps unrelated, but worth noting, is that tclkit also has trouble when run through a symlink (this is definitely of secondary imortance to me for now). - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "jcw"
- subsystem changed to: "38. Init - Library - Autoload"
- title changed to: "encodings can't be found"
- type changed to: "Bug"