Skip to content
Tcl Source Code View Ticket
Login

View Ticket

can't find the encoding/ directory on Linux

Closed / Works For Me749448ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-06-05 10:13:10
Here is how to hack the tclEncoding.c:
/*     Tcl_ListObjGetElements(NULL, pathPtr, &objc, &objv);
    chan = NULL;
    for (i = 0; i < objc; i++) {
chan = OpenEncodingFile(Tcl_GetString(objv[i]), name);
if (chan != NULL) {
    break;
}
    }
 */
chan = OpenEncodingFile("/usr/local/lib/tcl8.4", name);
(:))))))))))))))))))))))))))))))
Debugging with gdb gets the following result:

in Tcl_GetStringFromObj the first ptr is checked
if (objPtr->bytes == NULL); well, it isn't, but the string
is empty -- (the second, third ... are ok - the desired
catalog is in the seventh)
hence it's empty - we get zero length in:
string = Tcl_GetStringFromObj(objPtr, &length);

That's it. 
------

--alex
vincentdarleyplain2003-06-05 17:18:18
Logged In: YES 
user_id=32170

You don't mention what the bug actually is (what error 
message you get, what you expected, etc), how to 
reproduce it or almost anything at all, really.

Certainly on linux Tcl can find the encoding directory for 
99.9% of us, so unless you provide more information, this 
report doesn't actually help anyone.
Log in (anonymous is fine) to add a comment.