Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1b08f2a975bf4bcd93ef93cfe94b9887670ea68b
Ticket: 1201171fffffffffffffffffffffffffffffffff
TclpSetInitialEncodings works only once on Unix
User & Date: yaroslav1 on 2005-05-13 06:51:31
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. 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.
    
    
  4. foundin changed to: "obsolete: 8.4.9"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "yaroslav1"
  9. subsystem changed to: "38. Init - Library - Autoload"
  10. title changed to: "TclpSetInitialEncodings works only once on Unix"
  11. type changed to: "Bug"