Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15146
| From | Dennis Clarke <dclarke@blastwave.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: built-in printf %f parameter format depend on LC_NUMERIC |
| Date | 2019-07-12 15:55 -0400 |
| Message-ID | <mailman.1054.1562961325.2688.bug-bash@gnu.org> (permalink) |
| References | (6 earlier) <4dde13d8-dc42-52b5-bc15-e5390f6d7ec5@archlinux.org> <a048b783-79c0-24fe-d456-deea9a50a149@case.edu> <51bed6f0-eeb8-c93b-33e7-6ccaf4d73b3f@blastwave.org> <a46a31ec-76b0-ccca-b867-831331413860@case.edu> <6368906c-62d5-eccb-458b-2cbb6156416a@blastwave.org> |
On 7/12/19 3:50 PM, Chet Ramey wrote: > On 7/12/19 3:46 PM, Dennis Clarke wrote: > >> uh huh ... >> >> LC_NUMERIC >> >> This category specifies the decimal and thousands >> delimiters. The information corresponding to this >> category is stored in a database created by the >> localedef() command. The default C locale >> corresponds to "." as the decimal delimiter and no >> thousands delimiter. This environment variable is >> used by localeconv(3C), printf(3C), and strtod(3C). > > I assume this means that bc doesn't use strtod. > I dunno ... I am surprised here. I thought *everything* in strict POSIX and XPG4/XPG6 compliant systems were locale aware and neatly smart about how to talk to the user. Here is "C" or "POSIX" locale : corv $ corv $ df -h Filesystem Size Used Available Capacity Mounted on jupiter_zones/z/001 95G 85G 9.8G 90% / /dev 95G 85G 9.8G 90% /dev proc 0K 0K 0K 0% /proc ctfs 0K 0K 0K 0% /system/contract mnttab 0K 0K 0K 0% /etc/mnttab objfs 0K 0K 0K 0% /system/object swap 8.0G 74M 7.9G 1% /etc/svc/volatile fd 0K 0K 0K 0% /dev/fd swap 8.0G 74M 7.9G 1% /tmp swap 8.0G 74M 7.9G 1% /var/run corv $ Now Let's go to France ! corv $ LC_ALL=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 df -h Système de fichiers Taille Utilisé Disponible Capacité Monté sur jupiter_zones/z/001 95G 85G 9,8G 90% / /dev 95G 85G 9,8G 90% /dev proc 0K 0K 0K 0% /proc ctfs 0K 0K 0K 0% /system/contract mnttab 0K 0K 0K 0% /etc/mnttab objfs 0K 0K 0K 0% /system/object swap 8,0G 74M 7,9G 1% /etc/svc/volatile fd 0K 0K 0K 0% /dev/fd swap 8,0G 74M 7,9G 1% /tmp swap 8,0G 74M 7,9G 1% /var/run corv $ Yep. Perfect. And then there is "bc" which seems to care less. Yep, I just gotta look at the sources. -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: built-in printf %f parameter format depend on LC_NUMERIC Dennis Clarke <dclarke@blastwave.org> - 2019-07-12 15:55 -0400
csiph-web