On 12/3/25 5:38 AM, Léa Gris wrote:

So for Bash it is ok to set TMOUT to 3.141592 with LC_NUMERIC=fr_FR.UTF-8 decimal_point=","

The code that parses TMOUT for the read builtin uses `.' instead of the
locale's decimal point (it predates bash's i18n). Maybe it should
recognize both.


So why is it not ok to printf '%f\n' 3.141592 with LC_NUMERIC=fr_FR.UTF-8 decimal_point="," then?

Because POSIX requires the arguments to the %f conversion specification to
be converted (as if by) using strtod(3), and strtod is locale-aware.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Reply via email to