Date:        Fri, 25 Jan 2019 12:29:12 -0000 (UTC)
    From:        chris...@astron.com (Christos Zoulas)
    Message-ID:  <q2eveo$109$1...@blaine.gmane.org>

  | I think that we should consult what the standards say about all of this,

What POSIX says in general, about locales and how they should be
used is ...

        The standard utilities in the Shell and Utilities volume of POSIX.1-2017
        shall base their behavior on the current locale, as defined in the
        ENVIRONMENT VARIABLES section for each utility.

The section for sleep(1) doesn't mention LC_NUMERIC, as sleep (in POSIX) has
nothing locale specific to deal with, just integers.

But for at(1) it says (not about LC_NUMERIC, but LC_TIME, but an analogy
can probably be made).

As for the other OS's, I believe that linux supports floating point, but I have
no idea how they parse it (I'll ask Paul Eggert, he's listed as one of its
authors) I very much doubt that any of the commercial (or ex-commercial)
ones would, they tend to be conservative about such things.

kre

        LC_TIME Determine the format and contents for date and time
                strings written and accepted by at.

which suggests that "at" should take "at 17:00 Dienstag" in a DE locale,
rather than "at 5pm Thursday".

But of awk it says ...

    LC_NUMERIC
                  Determine the radix character used when interpreting numeric 
input, performing
                  conversions between numeric and string values, and formatting 
numeric output.
                  Regardless of locale, the <period> character (the 
decimal-point character of the
                  POSIX locale) is the decimal-point character recognized in 
processing awk
                  programs (including assignments in command line arguments).


There really are very few programs in the standard set which take anything
except file names (which are locale specific, but that means nothing, to the
program the names are just byte strings) single letter options, and the 
occasional ingeger or arbitrary string as args.   So the issue hasn't really
come up.

lre



Reply via email to