Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15146
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Dennis Clarke <dclarke@blastwave.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: built-in printf %f parameter format depend on LC_NUMERIC |
| Date | Fri, 12 Jul 2019 15:55:17 -0400 |
| Lines | 77 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.1054.1562961325.2688.bug-bash@gnu.org> (permalink) |
| References | <5d24be33.1c69fb81.59c43.fe4dSMTPIN_ADDED_BROKEN@mx.google.com> <a212b38c-914d-dda6-8d22-e9039063768e@case.edu> <6468b45e-5b4a-8edf-4ab8-0838843beaaf@noiraude.net> <b6f65b6b-1487-0c46-6530-fa6d700ff1ca@case.edu> <7c757690-24bd-7b1a-cf8e-af63cbe05216@noiraude.net> <91ed1981-df04-aa06-b108-23c7f89de3b4@case.edu> <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> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | usenet.stanford.edu 1562961326 12751 209.51.188.17 (12 Jul 2019 19:55:26 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | chet.ramey@case.edu, bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| X-TCPREMOTEIP | 99.253.177.25 |
| X-Authenticated-UID | dclarke@blastwave.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 |
| In-Reply-To | <a46a31ec-76b0-ccca-b867-831331413860@case.edu> |
| Content-Language | en-US |
| X-MIME-Autoconverted | from 8bit to quoted-printable by atl4mhob12.registeredsite.com id x6CJtIrm022529 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 3.x |
| X-Received-From | 209.17.115.50 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <6368906c-62d5-eccb-458b-2cbb6156416a@blastwave.org> |
| X-Mailman-Original-References | <5d24be33.1c69fb81.59c43.fe4dSMTPIN_ADDED_BROKEN@mx.google.com> <a212b38c-914d-dda6-8d22-e9039063768e@case.edu> <6468b45e-5b4a-8edf-4ab8-0838843beaaf@noiraude.net> <b6f65b6b-1487-0c46-6530-fa6d700ff1ca@case.edu> <7c757690-24bd-7b1a-cf8e-af63cbe05216@noiraude.net> <91ed1981-df04-aa06-b108-23c7f89de3b4@case.edu> <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> |
| Xref | csiph.com gnu.bash.bug:15146 |
Show key headers only | View raw
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