Overview
| Artifact ID: | 5ae095e19ec180021f9c739348034e4344bcc15bb42fcf63feabebf1f666152c |
|---|---|
| Ticket: | 2a0966cdc987a347b2d1d9493994f3129bd50119
[encoding dirs] default values |
| User & Date: | apnadkarni on 2026-05-23 11:04:26 |
Changes
- icomment:
Don, TL;DR I think the best approach is (as you suggested) prepend the zipfs directory instead of appending it to the search path. If you think this satisfactory, I'll make the modification. I don't think reverting back to just setting it (overwriting existing value) is advisable. Let me try to recall and summarize all the context regarding the [encoding dirs] issue. The original issue was that on macos tkinter was failing because it was not able to find init.tcl. This is connected to encodings because of the `encodings` directory located under `tcl_library`. With respect to why the zipfs path is appended and not set as used to be the case, see my reply *apnadkarni added on 2025-11-17 06:13:00:* in ticket [6fbabfe166](https://core.tcl-lang.org/tcl/tktview/6fbabfe166) in response to your query there. To reiterate, the cause of the failure was that the search path was set (*not appended*) to the zipfs location. The problem was that on macos, zipfs was either not present or not available **even on --enable-zipfs builds**. (I'll leave it to macos developers to explain under what circumstances and build configurations this can happen - see Marc and Jan's responses to [6fbabfe166](https://core.tcl-lang.org/tcl/tktview/6fbabfe166) for starters. The setting of search path overwrote the default macos path that would normally be used resulting in the failure. Appending instead of setting fixed the above problem. The other issue with setting/overwriting as I recall was that applications can call `Tcl_SetEncodingSearchPath` to set the encoding directories search path and it was not clear exactly when this might happen (the second point in the above-mentioned apnadkarni reply link). If that function has been called, it did not seem appropriate to overwrite it. If we were to revert to setting the directory search path instead of appending to it, someone needs to provide a solution for the above macos failure, either supporting zipfs builds or generating a configure / make error if --enable-zipfs is true, and testing it in appropriate build configurations. I'm not that person. Ignorant about all things mac, don't have a mac and Github CI is very painful way to develop. One possibility would to append in the case of macos and overwrite on other platforms. I am not in favor of different behaviors on different platforms though. All the above is reflective of Tcl 9.0. TIP 732 / 9.1 does not change anything substantial in the above because the initialization of the default path on macos is unchanged.
- login: "apnadkarni"
- mimetype: "text/x-markdown"