Hi Rich,

Thanks for your explanation.

Just call setlocale(LC_CTYPE, ""). This is the only way a correct
program should ever use setlocale.

So, if I understand correctly, any program that expects `nl_langinfo`
to return the locale set through environment variables (or otherĀ 
platform-specific ways) should call setlocale(LC_*, "") beforeĀ 
querying the locale; libc/musl/... will not trigger this registration itself.

NULL is not the same thing as "". Passing NULL as the second argument
to setlocale simply queries the current locale name. It does not setup
the locale.

Right, I was just pointing out that the locale I tried to set in env variables wasn't
being reported as the current locale by setlocale().

thanks!
Remko