|
2026-10-22
| ||
| 17:19 | • Ticket [63941fee4f] interp create resets the system encoding set by encoding sys... artifact: 7d1c2071a0 user: serhiy.storchaka | |
|
2026-10-20
| ||
| 08:42 | • Ticket [c35e347c6f] Concurrent Tcl_Init calls race in Unix locale initialization... artifact: f599e9b2c9 user: serhiy.storchaka | |
|
2026-10-18
| ||
| 21:44 | • Ticket [c35e347c6f]: 3 changes artifact: 1034e112f5 user: serhiy.storchaka | |
| 21:02 | • Ticket [c35e347c6f]: 3 changes artifact: 7283e91c05 user: jan.nijtmans | |
|
2026-10-17
| ||
| 07:25 | • Closed ticket [63941fee4f]: interp create resets the system encoding set by enco... artifact: 651c1cbbd3 user: serhiy.storchaka | |
| 07:22 | Fix [63941fee4f]: interp create resets the system encoding set by [encoding system] check-in: 27f849b6b3 user: serhiy.storchaka tags: core-9-0-branch | |
| 07:19 | Fix [63941fee4f]: interp create resets the system encoding set by [encoding system] check-in: 00b1026efe user: serhiy.storchaka tags: trunk, main | |
| 06:46 | • Ticket [63941fee4f] interp create resets the system encoding set by encoding sys... artifact: f3d1ce6b6c user: jan.nijtmans | |
|
2026-10-16
| ||
| 22:12 | • Ticket [63941fee4f]: 3 changes artifact: d4ba36ed13 user: serhiy.storchaka | |
| 22:09 | Fix [63941fee4f]: interp create reset the system encoding set by [encoding system]. TclpSetInitialEn... closed check-in: 03512d66eb user: serhiy.storchaka tags: initial-encoding-once | |
| 22:05 | • New ticket [63941fee4f] interp create resets the system encoding set by encoding... artifact: 0a1b32dcc7 user: serhiy.storchaka | |
interp create resets the system encoding set by encoding system
Closed / Fixed63941fee4fc984f8675b6cabff50b18457b9255bCreated 48 days agoUpdated 42 days ago
Descriptionwiki2026-10-16 22:05:58
Since [17c53b7edd] (the fix for [fccb9f322f]) Tcl_Init() calls TclpSetInitialEncodings() for every interpreter, so creating an interpreter (also with Thread or Tk) resets the system encoding to the one from the environment:
encoding system koi8-r interp create a encoding system ;# utf-8 (8.6: koi8-r)
The repeated detection is also what calls setlocale() in parallel threads in [c35e347c6f]. It is only needed while the earlier detection failed (the encoding files were not found yet).
Referenced by6
f599e9b2c9Ticket [c35e347c6f] Concurrent Tcl_Init calls race in Unix locale initialization, causing crashes on OpenBSD status still Open with 3 other changes ticket2026-10-20 08:42:501034e112f5Ticket [c35e347c6f] Concurrent Tcl_Init calls race in Unix locale initialization, causing crashes on OpenBSD status still Open with 3 other changes ticket2026-10-18 21:44:147283e91c05Ticket [c35e347c6f] Concurrent Tcl_Init calls race in Unix locale initialization, causing crashes on OpenBSD status still Open with 3 other changes ticket2026-10-18 21:02:5827f849b6b3Fix [63941fee4f]: interp create resets the system encoding set by [encoding system] check-in2026-10-17 07:22:1900b1026efeFix [63941fee4f]: interp create resets the system encoding set by [encoding system] check-in2026-10-17 07:19:4803512d66ebFix [63941fee4f]: interp create reset the system encoding set by [encoding system]. TclpSetInitialEncodings() sets the encoding from the environment only until it succeeds, so the calls from Tcl_Init() added for [fccb9f322f] no longer reset it. check-in2026-10-16 22:09:50
serhiy.storchakawiki2026-10-16 22:12:02
Proposed fix in branch initial-encoding-once: TclpSetInitialEncodings() sets the encoding from the environment only until it succeeds, so later Tcl_Init() calls do not reset it and do not call setlocale() again. The retry for [fccb9f322f] still works (unixInit-3.2). Test encoding-31.5.
jan.nijtmanswiki2026-10-17 06:46:04
I agree with this.
Please go ahead merging this!
serhiy.storchakawiki2026-10-17 07:25:45
Merged into main in [00b1026efe] and into 9.0 in [27f849b6b3].
serhiy.storchaka Ticket [63941fee4f]: 3 changes
[History diff]2026-10-22 17:19:27
Log in (anonymous is fine) to add a comment.