Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15157
| 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 20:47:25 -0400 |
| Lines | 88 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.1077.1562978853.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> <e86fb996-9879-616f-948c-758d6cc6ab79@inlv.org> <8f35d89c-da3c-661a-c1d5-b9c70ace6196@case.edu> <f1cfc794-be2b-3f94-08fb-24127794b054@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 1562978854 23631 209.51.188.17 (13 Jul 2019 00:47:34 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | 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 | <8f35d89c-da3c-661a-c1d5-b9c70ace6196@case.edu> |
| Content-Language | en-US |
| X-MIME-Autoconverted | from 8bit to quoted-printable by atl4mhob16.registeredsite.com id x6D0lQis042207 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 3.x |
| X-Received-From | 209.17.115.109 |
| 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 | <f1cfc794-be2b-3f94-08fb-24127794b054@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> <e86fb996-9879-616f-948c-758d6cc6ab79@inlv.org> <8f35d89c-da3c-661a-c1d5-b9c70ace6196@case.edu> |
| Xref | csiph.com gnu.bash.bug:15157 |
Show key headers only | View raw
On 7/12/19 4:45 PM, Chet Ramey wrote:
> On 7/12/19 4:26 PM, Martijn Dekker wrote:
>> Op 12-07-19 om 21:46 schreef Dennis Clarke:
>>> Well the man page for XPG6 bc in Solaris 10 claims :
>>>
>>> ENVIRONMENT VARIABLES
>>> See environ(5) for descriptions of the following environment
>>> variables that affect the execution of bc: LANG, LC_ALL,
>>> LC_CTYPE, LC_MESSAGES, and NLSPATH.
>>>
>>> Really?
>>
>> Note the absence of LC_NUMERIC in that paragraph.
>
> Yeah, but LC_ALL overrides LC_NUMERIC anyway.
>
Maybe.
setlocale ( LC_ALL, "" );
Undoes all that in a jiffy.
I just cracked open the sources to XPG6/XPG4 dc which is the backend to
bc and guess what ?
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
.
.
.
int
main(int argc, char **argv)
{
(void) setlocale(LC_ALL, "");
(void) textdomain(TEXT_DOMAIN);
init(argc, argv);
commnds();
/* NOTREACHED */
}
.
.
.
So there you see it in all its glory.
--
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 20:47 -0400
csiph-web