On Mon, 16 Jul 2018, Jakub Wilk wrote:
> This code forces POSIX locale by unsetting all environment variables. This is
> a very lazy^Wclever method, but as I mentioned in the original bug report, it
> has unwanted side effects with security implications.
It also is not guaranteed to work:
4. If the LANG environment variable is not set or is set to the empty
string, the implementation-defined default locale shall be used.
From:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02
So, the correct way to force the POSIX locale is:
① unset LANGUAGE (on GNU/glibc/compatible systems)
② export LC_ALL=C (on GNU and POSIX systems)
bye,
//mirabilos
--
[17:15:07] Lukas Degener: Kleines Asterix-Latinum für Softwaretechniker:
veni, vidi, fixi(t) ;-)