Skip to content
Tcl Source Code History Of Ticket 2c0f49e26c27847a
Login

History Of Ticket 2c0f49e26c27847a

Artifacts Associated With Ticket 2c0f49e26c27847a

  1. Ticket change [116f74a77b] (rid 238210) by apnadkarni on 2025-03-04 08:07:15:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      Running the following script in Tcl 8.6 and Tcl 9 gives different results, Tcl 8.6 seems correct behavior.
      
      ```
      package require msgcat
      namespace eval ::tcl::clock {
          ::msgcat::mcset fr_xx DATE_FORMAT "%e|%B|%Y"
      }
      puts [package require Tcl]
      puts [clock format 0 -format %x -locale fr]
      puts [clock format 0 -format %x -locale fr_xx]
      
      ```
      
      Output from Tcl 8.6:
      
      ```
      8.6.16
       1 janvier 1970
       1|janvier|1970 <- Note pipe separator
      ```
      
      Output from 9.0.1:
      
      ```
      9.0.1
       1 janvier 1970
       1 janvier 1970 <- fr_xx format seemingly ignored
      ```
      
      If the line for the `fr` locale is commented, Tcl 9 correctly prints the `fr_xx` format.
      
    5. foundin initialized to: "9.0.1"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "None"
    15. title initialized to:
      Tcl 9 clock format -locale does not look up locale children if parent locale used first
      
    16. type initialized to: "Bug"
  2. Ticket change [24ceb700bf] (rid 238211) by sebres on 2025-03-04 15:04:38:

    1. icomment:
      Good catch, Ashok!
      
      The reason for that is that new clock-engine caching the msgcat dictionary internally in merged catalog (from parent to child locale), but more important here is that "%x" is so called "localized" format (since it expanding in `::tcl::clock::LocalizeFormat`) and its result becomes also cached in merged catalog with keys `FMT_*` (here by `FMT_%x`), but (because it is not overwritten), the value remains as the value from parent catalog (after merge in `::tcl::clock::mcMerge`).
      
      The fix is simple, so I'll fix it now (and cover by a test).
      
    2. login: "sebres"
    3. mimetype: "text/x-markdown"
  3. Ticket change [6c702c5bdb] (rid 238220) by sebres on 2025-03-04 15:57:30:

    1. closedate changed to: "2460739.16493666"
    2. closer changed to: "sebres"
    3. foundin changed to: "8.7+"
    4. icomment:
      Fixed in [dc5c5857c146c665] and merged to all derived branches.
      
    5. login: "sebres"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. subsystem changed to: "16. Commands A-H"