Tcl Source Code

View Ticket
Login
2026-10-17
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
2025-08-03
17:42
Re-fix [fccb9f322f]. Also eliminate bumping of file system epoch on every interp creation introduced... check-in: abeb195484 user: apnadkarni tags: bug-87b69745be
2024-09-13
12:36 • Ticket [fccb9f322f] unixInit-3.2 fails when encodings dir is in zipfs status... artifact: 9b54c8d4b2 user: jan.nijtmans
12:16
(Backport): Fix bug [fccb9f322f] - system encoding detection check-in: c1d2047f90 user: jan.nijtmans tags: core-8-branch
2024-08-31
00:47
merge [17c53b7edd516003]: Fix bug [fccb9f322f] - system encoding detection. check-in: 1cd8653ce0 user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE
2024-08-11
17:27 • Closed ticket [fccb9f322f]: unixInit-3.2 fails when encodings dir is in zipfs</i... artifact: b564ec1aae user: apnadkarni
17:24
Fix bug [fccb9f322f] - system encoding detection check-in: 17c53b7edd user: apnadkarni tags: trunk, main
2024-08-03
12:36 • Ticket [fccb9f322f] unixInit-3.2 fails when encodings dir is in zipfs status... artifact: 2ffbeb4973 user: apnadkarni
12:30
Bug [fccb9f322f] - incorrect system encoding with zipfs builds check-in: 0f14007371 user: apnadkarni tags: bug-fccb9f322f
2022-11-22
19:44 • Ticket [75ecc0e6cb] TclInitSubsystems issues: the sporadic lack of encodings... artifact: 03809c58a5 user: jan.nijtmans
19:43 • Ticket [fccb9f322f] unixInit-3.2 fails when encodings dir is in zipfs status... artifact: b68674b256 user: jan.nijtmans
2022-11-21
23:52
Mark unixInit-3.2 as "knownBug". See [fccb9f322f] check-in: 6850595984 user: jan.nijtmans tags: core-8-branch
2022-11-20
22:25 • New ticket [fccb9f322f] unixInit-3.2 fails when encodings dir is in zipfs. artifact: 42223ff2b1 user: dgp

Ticket UUID: fccb9f322f550a37839651d791fed731e2a93d75
Title: unixInit-3.2 fails when encodings dir is in zipfs
Type: Bug Created on: 2022-11-20 22:25:03
Submitter: dgp Assigned to: nobody
Subsystem: 10. Objects Severity: Important
Priority: 5 Medium Last modified: 2024-09-13 12:36:09
Status: Closed Closed by: jan.nijtmans
Resolution: Fixed Closed on: 2024-09-13 12:36:09
Version: 8.7
Description:
Make a fresh build of tclsh.  Set the environment variable LANG to 'japanese'.  Then:

$ cat demo.tcl
puts [encoding dirs]
puts [encoding system]
$ ./tclsh demo.tcl
//zipfs:/app/tcl_library/encoding
iso8859-1

The system encoding should be 'euc-jp'

Next set the environment variable TCL_LIBRARY to point to the script library in
the source code distribution and repeat:

$ ./tclsh demo.tcl              
../library/encoding
euc-jp

Something is going wrong with initialization of the system encoding when the set
of *.enc files is stored in the zipfs filesystem.

The test unixInit-3.2 was supposed to catch problems like this, but the customary
use of the TCL_LIBRARY environment variable when testing was masking
the problem.

I've revised the test unixInit-3.2 to end the masking of the problem.
User Comments:
jan.nijtmans added on 2022-11-22 19:43:48:

This is a dup of [75ecc0e6cb9899bf], which already has a branch with a proposed fix


apnadkarni added on 2024-08-03 12:36:08:
I am not sure this is a dup of  [75ecc0e6cb9899bf] as this seems to be specific to use of zipfs.

Proposed fix is [bug-fccb9f322f]. Review requested.

I am not entirely comfortable with this fix as it corrects the system encoding after it has already been initialized. On the other hand, doing it right in the first place would require the zipfs initialization to be moved up in the init sequence, something I am even more hesitant to do as init of Tcl is a big mystery to me.

So my take is that this is not an ideal fix, but better than the current state.

apnadkarni added on 2024-08-11 17:27:38:
Fixed in [17c53b7edd]. unixInit-3.2 passes github CI on all platforms.

jan.nijtmans added on 2024-09-13 12:36:09:

Now [c1d2047f90|backported] to 8.7 as well.