~skeeto/public-inbox

1

Re: Everything you never wanted to know about Win32 environment blocks

John Doty <john@d0ty.me>
Details
Message ID
<c2a4c4d7-95cc-48a4-8047-c79b55eba261@app.fastmail.com>
DKIM signature
pass
Download raw message
> Windows uses some kind of case-insensitive, but not case-folded, undocumented early 1990s UCS-2 sorting logic for environment variables.

I strongly suspect that it ends up in something equivalent to `RtlCompareUnicodeString` with the `CaseInsensitive` parameter set to `TRUE`. (Or at least, some functionally-equivalent copypasta.) That function is old enough that it almost certainly doesn't do anything right or proper or culture-sensitive when doing the comparison.

thanks,
john

Re: Everything you never wanted to know about Win32 environment blocks

Details
Message ID
<20230824230156.epshq4ifabnvva7q@nullprogram.com>
In-Reply-To
<c2a4c4d7-95cc-48a4-8047-c79b55eba261@app.fastmail.com> (view parent)
DKIM signature
missing
Download raw message
Thanks, John, I think that's it! I tested my pathological inputs, and they 
all match get/set. I've updated the article with this information. This is 
exactly the sort of thing I was trying to find in my research.
Reply to thread Export thread (mbox)