Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: fc0c2f6bb7650192fbf73c80f0b7231c4964f543
Ticket: 1317477fffffffffffffffffffffffffffffffff
clock format %c %X %Z output garbled string on Windows
User & Date: nobody on 2005-10-08 08:29:39
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    ActiveTcl8.4.11
    Windows2000(Japanese)
    
    clock format 0 -format %Z
    clock format 0 -format %X
    clock format 0 -format %c
    clock format 0 -format %x
    
    clock format %c, %X and %Z output garbled string.
    I read source code and found points of problems.
    Next is details.
    
    %Z
    compat/strftime.c use multi-byte string.
    But Windows TclpGetTZName returned UTF8 string.
    And this string wasn't converted to muiti-byte.
    
    %c %x %X
    we should use LOCALE_USE_CP_ACP flag at GetDateFormat
    in compat/strftime.c.
    If system language wasn't same as locale option language,
    clock format %c and %X output garbled string.
    Of cource, this is a rare case, and if windows could not 
    map locale encoding to system encoding, then we get
    garbled string after all....
    
    
    I' wrote patch for compat/strftime.c. please see it too.
    thanks
    
  4. foundin changed to: "obsolete: 8.4.11"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "16. Commands A-H"
  10. title changed to:
    clock format %c %X %Z output garbled string on Windows
    
  11. type changed to: "Bug"