Files
jq/tests
Wei-Lun Li ceca195b9e Read environment variables as UTF-8 on Windows (#3713)
On Windows, $ENV and env were built from environ, which the C library
fills in the ANSI code page, so names and values outside of it were
mangled before jq saw them.

Build the environment object from GetEnvironmentStringsW() and convert
each entry from UTF-16 to UTF-8, skipping the hidden per-drive working
directory entries starting with '=' as environ does, and skipping any
entry that fails to convert. env and $ENV now share a single reader,
get_env() in util.c, which also skips malformed entries without '='
in both, instead of env mapping them to null and $ENV deleting an
existing variable of that name. Other platforms still read environ.
2026-12-06 10:34:44 +09:00
..
…
…
…
…
…
…