Locale oddity
Morten Bo Johansen
listmail at mbjnet.dk
Mon Jul 20 09:30:43 UTC 2020
On 2020-07-19 Yuri Pankov wrote:
> I'm not sure what exactly you are asking, so I'll just quote the
> specification,
> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html,
> for the logic used:
Well, the reason I was asking was that I was working on a
script where one of the functions will determine the user's
language reliably from the locale settings. Therefore I tried
various error handling, like e.g. the LANG variable not being
set, etc. and I noticed this behaviour and I wondered why. I
see the rule #4 you are referring to, but the logic in it is
still not clear to me: Some script or program might set the
$LANG variable to an empty value and then the LC_* variables
that I set myself will be changed behind my back?
Anyway, thanks for the answer to you and Polytropon.
Morten
More information about the freebsd-questions
mailing list