Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unicode allowables in Environment variables
- X-seq: zsh-workers 53198
- From: William DeShazer <earl.deshazer@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Unicode allowables in Environment variables
- Date: Mon, 4 Nov 2024 15:46:36 -0800
- Archived-at: <https://zsh.org/workers/53198>
- In-reply-to: <CAH+w=7Y5viFEK4UdJCt_tSFxU+f+qa1fzxduWO0+BGhHR2Hbdw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <91C10172-A533-487F-8D78-20129CA96689@gmail.com> <CAHYJk3SXo5Z26xMtuWUvsU+QvGzTD7oYUCk3QugppG0u4ce1fw@mail.gmail.com> <CAA=-s3yC_bgFheW74=u34YhL-xT-q294qs_L8BC9tKDtLCB7PQ@mail.gmail.com> <5CF1A197-AB70-4D07-BA0C-618213A2ACA1@gmail.com> <C54A42B1-07B6-4726-A7FB-CAD1E73C812A@gmail.com> <CAH+w=7bunCEwaaQSe+bToon3F1yH+iq_Eb35fNO1D9R+zNBGjQ@mail.gmail.com> <CAA=-s3yQUNacMpy7m7Ea2BBt=GgTJGPzhPyKS1hxfCyEgA3tSQ@mail.gmail.com> <CAH+w=7ZLMw_yntU3mnp0YwAmaa8gRif_=N0_4HkXA517offbYA@mail.gmail.com> <CAA=-s3zT5zzbA1YaWLGhSamkQ_s77pHTqw5N6iVCF+uo=gW1Ow@mail.gmail.com> <CAH+w=7bebJ3zatyodiHmT9i0CJW7BHhfC_iA_4+sc93+4+JVpw@mail.gmail.com> <CAH+w=7ZmVjD-3xSSwewSgfVJvWW=CB+=vodSRxgpSwPojYLeqg@mail.gmail.com> <CAA=-s3xovjsEhqmcOLeJ-5TcpcivCKMHn3NTDCnfWGgyJcKXMQ@mail.gmail.com> <CAH+w=7ai4-2_=tzNratoou=gPgZKV4-c_+nFmWBom8Wd8ZWHRw@mail.gmail.com> <CAA=-s3z_0XHG1dN5125MV=XKi3V0tgQguy36P1G0NBvqTE4C8g@mail.gmail.com> <77CB1ACE-0320-4FDD-B832-5E8B3C74B636@gmail.com> <CAA=-s3yReuGTNEybovtnzfHU8A3rC5Nvmx3V7WUmdRECys+PBQ@mail.gmail.com> <CAH+w=7Y5viFEK4UdJCt_tSFxU+f+qa1fzxduWO0+BGhHR2Hbdw@mail.gmail.com>
One interesting observation by the way is that it is on ZDOTDIR that is getting munged.
ZSH_CUSTOM
ZSH
XDG_CONFIG_HOME
XDG_DATA_HOME
XDG_CACHE_HOME
FPATH/fpath
PATH/path
all retain the Crystal Ball Unicode character cleanly through initialization. It is just ZDOTDIR that exhibits the behavior. We will know more soon enough, but I look forward to knowing why someone is picking on ZDOTDIR. It is one of my favorite environment variables, so I take it personally. 😊
With regard to your Valgrind observation, I am not surprised. Few people would hazard to put Unicode characters in their path name, especially non-Portable ones. This may not be tested for. I don’t know Valgrind very well, so I probably shouldn’t speculate too much.
I am surprised it hasn’t shown up in one of the other languages, but maybe the unicode characters for languages were constructed to purposefully keep away from these code-points. These seem to be reserved for all of the coolest characters, if I do say so myself.
Will
> On Nov 4, 2024, at 15:27, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Nov 4, 2024 at 1:11 PM Mark J. Reed <markjreed@xxxxxxxxx> wrote:
>>
>> I'm not sure why unmetafy() is munging it at all ... Possibly because it proceeds right on past the nul terminator if the string has no Meta in it.
>
> valgrind reports no OOB errors, FWIW.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author