Overview
| Artifact ID: | 1b08f2a975bf4bcd93ef93cfe94b9887670ea68b |
|---|---|
| Ticket: | 1201171fffffffffffffffffffffffffffffffff
TclpSetInitialEncodings works only once on Unix |
| User & Date: | yaroslav1 on 2005-05-13 06:51:31 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
I think I found a bug in Tcl that prevents a tclkit to find and use the proper system encoding in a non-English locale. Of course, it is not a bug for Tcl itself, because this function is really called just once on startup (and does its job). But tclkit has to call it twice --- on startup and after mounting VFS which contains encoding files. A patch to unix/tclUnixInit.c: -----------------PATCH--------------------- --- tclUnixInit.c Thu May 12 20:18:51 2005 +++ tclUnixInit.c.new Thu May 12 20:14:03 2005 @@ -485,7 +485,8 @@ void TclpSetInitialEncodings() { - if (libraryPathEncodingFixed == 0) { + +/* if (libraryPathEncodingFixed == 0) { */ CONST char *encoding = NULL; int i, setSysEncCode = TCL_ERROR; Tcl_Obj *pathPtr; @@ -647,6 +648,7 @@ * dependent behavior. */ + if (libraryPathEncodingFixed == 0) { setlocale(LC_NUMERIC, "C"); /* -----------------PATCH--------------------- This problem really needs to be fixed --- it makes tclkit practically unusable for non-English users. And I don't see a way how Tcl will suffer from it. - foundin changed to: "obsolete: 8.4.9"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "yaroslav1"
- subsystem changed to: "38. Init - Library - Autoload"
- title changed to: "TclpSetInitialEncodings works only once on Unix"
- type changed to: "Bug"