Artifacts Associated With Ticket 8014353dcb
Ticket change [4fe360e36d] (rid 253069) by apnadkarni on 2026-04-26 11:04:56:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
As the transcript below shows, appending to an environment variable using the lowercase name when originally stored as uppercase overwrites instead of appending. However, ``` c:\src\tcltk\wip\tcl\win>set USERNAME USERNAME=ashok c:\src\tcltk\wip\tcl\win>tclsh % set env(USERNAME) ashok % append env(username) nadkarni nadkarni <--------------- OVERWRITE % set env(USERNAME) nadkarni % exit c:\src\tcltk\wip\tcl\win>tclsh % set env(USERNAME) ashok % append env(USERNAME) nadkarni ashoknadkarni <---------------OK % set env(USERNAME) ashoknadkarni % exit ``` Curiously, if the value is read previously in lowercase before appending, it all works as expected. ``` c:\src\tcltk\wip\tcl\doc>tclsh % set env(username) <---------------- read using lowercase ashok % append env(username) nadkarni ashoknadkarni <---------------- then works as expected % set env(USERNAME) ashoknadkarni ```
- foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "08. Environment Variables"
- title initialized to: "append env(varname) overwrites existing value"
- type initialized to: "Bug"
Ticket change [57477a23cd] (rid 253070) by apnadkarni on 2026-04-26 11:12:37:
- icomment:
The `env` manpage states environment variable names `PATH` and `COMSPEC` are automatically converted to uppercase. It does not say anything about other environment variables. However, - the reported behavior is also seen with `PATH` - even if variables other than the above two are case-sensitive, there is still an inconsistency because in that case setting `username` should not affect `USERNAME`.
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [524d90df5a] (rid 253071) by apnadkarni on 2026-04-26 11:19:48:
- foundin changed to: "8.6"
- icomment: "Present in 8.6 as well"
- login: "apnadkarni"
- mimetype: "text/plain"
Ticket change [e3657f9aff] (rid 253737) by apnadkarni on 2026-05-21 13:43:48:
- icomment:
As per ticket [3057639fff], issues around append/lappend, compiled/uncompiled behavior seem to have been around forever and still exist. This ticket might be related.
- login: "apnadkarni"
- mimetype: "text/x-fossil-plain"
- icomment: