|
| From: | Chet Ramey |
| Subject: | Re: [bug #68453] bash 5.3 on macOS (Homebrew): inconsistent locale handling e.g. in printf builtin |
| Date: | Thu, 25 Jun 2026 15:20:50 -0400 |
| User-agent: | Mozilla Thunderbird |
On 6/24/26 11:02 PM, Collin Funk wrote:
Grisha Levit <grishalevit@gmail.com> writes:I think this behavior might just be a gnulib bug? AFAICT, what happens in this case (no relevant variables in the environment, System Preferences Language/Region set such that they do not match a valid locale): libintl_setlocale(LC_ALL,"") will set the LC_NUMERIC category (and others) by: * checking the value of the "AppleLocale" preference value (en_DE) * calling the system setlocale with this value (which fails) * finding an appropriate locale name based on the territory (de_DE) * calling the system setlocale with this value libintil_setlocale(LC_NUMERIC, "") uses a different code path, which does not do the last two steps, and so will just fail.Does bash use Gnulib's setlocale on MacOS?
It uses lib/intl from gettext-0.21.1. I changed to that version in
August, 2023. As I recall, there was something about gettext-0.22 that
made it unworkable with bash, but I can't remember exactly.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
| [Prev in Thread] | Current Thread | [Next in Thread] |