Fwd: [bug #68453] bash 5.3 on macOS (Homebrew): inconsistent locale handling e.g. in printf builtin
Chet Ramey via Bug reports for the GNU Bourne Again SHell <[email protected]> Fri, 19 Jun 2026 15:38:33 -0400
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Organization | ITS, Case Western Reserve University |
| Message-ID | <[email protected]> |
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------dw57K7p3h125daOqW0gEpQx9 Content-Type: multipart/mixed; boundary="------------Ki91dtyW52iTdDGmBQ0bRoFt"; protected-headers="v1" From: Chet Ramey <[email protected]> Reply-To: [email protected] To: "[email protected]" <[email protected]> Cc: [email protected] Message-ID: <[email protected]> Subject: Fwd: [bug #68453] bash 5.3 on macOS (Homebrew): inconsistent locale handling e.g. in printf builtin References: <[email protected]> In-Reply-To: <[email protected]> --------------Ki91dtyW52iTdDGmBQ0bRoFt Content-Type: multipart/mixed; boundary="------------v9KPDx2e0pFPtHEkBG49qo4p" --------------v9KPDx2e0pFPtHEkBG49qo4p Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit --------------v9KPDx2e0pFPtHEkBG49qo4p Content-Type: message/rfc822; name="[bug #68453] bash 5_3 on macOS (Homebrew): inconsistent locale handling e_g_ in printf builtin.eml" Content-Disposition: attachment; filename*0="[bug #68453] bash 5_3 on macOS (Homebrew): inconsistent loca"; filename*1="le handling e_g_ in printf builtin.eml" Content-Transfer-Encoding: 7bit Delivered-To: [email protected] Received: by 2002:a5d:6504:0:b0:462:9c0f:35b5 with SMTP id x4csp1029643wru; Thu, 18 Jun 2026 13:16:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AFNElJ8c+E8oTJckZWCnVqkZNaH1cH0QYiM88Y8rYTwTteuMeWM81QceJkpUvGwUjsZVGOGVa0Q=@case.edu X-Received: by 2002:a05:6870:fb8e:b0:442:175:cea7 with SMTP id 586e51a60fabf-44707aec104mr787586fac.1.1781813800551; Thu, 18 Jun 2026 13:16:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1781813800; cv=pass; d=google.com; s=arc-20240605; b=WTTzntVfINygu7F8by5EDzVEXjRAQZuoc+CntAKJc5/CGgdvzbr/QvUHxLZxs8wRoW I2h8ycjJ0NagE7kS9Jwt3wGEilIFoGjc1+2lxmbuyXuo/Kj7RrFSH/fT4OyM40C8F7WV GPpad8S964SYOkVnLXkai9nltuU6OG9rK6exLwwrAcTrTnuHkzZiVdoXs/QFoGlwQaP+ YWMPVoaq1A34Y/vhjNlwwKtAaK6XEaqBxT61Pou+hs+OmuPk0zeI6n6dS7nZOImZJaga C+4Ec5KAzn4vbLjRy8sRzQGWCN3ZXhPb2Z7hrPi48I3VSHQXBb4pyLLPkDVuQx15FNso rDjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=date:content-disposition:mime-version:reply-to:in-reply-to :references:message-id:source-code-offer:from:subject:to:arc-filter; bh=x3rjhj2YxQCaymnLRU2ojOL2QW1vRXC0bXhSvrxWnUo=; fh=1iWTDMMS+PsErAnpr/8DuPEu6xYKHgHKZ1EaoFscaXc=; b=Ucrt1BvCLOipLD5RfanyHvkZhHDszD8cYzUbiDTKnNP4lgqsF9KW05VPX7PFnEwfqX /HNqqcRor4AaV+dlE//HuW9/FG5yBD0Z7y2mjAmPm1bKhwDMSysgDCa0V3R9xM96UfcV yhg6Vh7V6026Bh0WQjmxO9DzfxO6y50enAGswenXX3Ot24leqfRaYW7D1MfCnK26T84J e+jw00QAWGdGojfmWwovJUhuVqI8z7ZyVO4MFwPYLuE5O+BVMzXjCLMVnh/GQ0DNfw1s w/aYjSsifxNyCvrH9Gy36kfU60b1wWIf5LefB8wH5QNVZTMSBJKerPR4hE0jCWNsQomk TASg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=savannah.gnu.org dmarc=pass fromdomain=gnu.org); spf=pass (google.com: domain of [email protected] designates 209.51.188.113 as permitted sender) [email protected] Return-Path: <[email protected]> Received: from mta-gglp-ksl-1.case.edu (mta-gglp-ksl-1.cwru.edu. [129.22.103.4]) by mx.google.com with ESMTPS id 586e51a60fabf-4470a4b7513si326802fac.288.2026.06.18.13.16.40 for <[email protected]> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 13:16:40 -0700 (PDT) Received-SPF: pass (google.com: domain of [email protected] designates 209.51.188.113 as permitted sender) client-ip=209.51.188.113; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=savannah.gnu.org dmarc=pass fromdomain=gnu.org); spf=pass (google.com: domain of [email protected] designates 209.51.188.113 as permitted sender) [email protected] ARC-Filter: OpenARC Filter v1.3.0 mta-gglp-ksl-1.case.edu A467AA805F9 Authentication-Results: mta-gglp-ksl-1; arc=none smtp.remote-ip=129.22.103.211 ARC-Seal: i=1; d=case.edu; s=cwru-mta; a=rsa-sha256; cv=none; t=1781813799; b=HTc1pliAbASvMWJz3Soc9IiRFSAdN2RBlBpinQqxjEwpzxj+mRoxSpxcvyW67toQALTQ JNOreFYL/+Yyb/6FHzIs6QDcrSkf9P2jNGseRALU88wIGXS/5+xFOQkl3jtCVrLO3tnQ3 Qm9zS+D4Ox9QtnZVwJGc/Zii+f02/GXC9ki62poYI85MStwBHzx3YYtsBlpprIWaFhVMr vDeSZkw+yUmlF7PUeahxjeTLNb4CTS2waGnRGjUtiUIAUZxSPS5wEqZ88QVkF6QTt7MHa JKs7NNEbkgD1O1wqzb49AqvG2ifeZfKtfUiXPz/aF3cXoY9OBo9bwmGlHlQfEL4fFWA== ARC-Message-Signature: i=1; d=case.edu; s=cwru-mta; a=rsa-sha256; c=relaxed/simple; t=1781813799; h=To:Subject:From:Message-Id:MIME-Version:Date:to:subject:message-id: date:from:mime-version:dkim-signature; bh=M5bP+P2Di9qFsZ1qNUT5aSCLWxUydouwivuR+9SJx0g=; b=RWsmbzAUcJXWOoL83x99mGMKx5Z2nzhPnc6QYfUgUBgQuAMIzoXdo/xhAU9E2qAFHZwj VJJ+LY3LjLDD7u1y5VOxL4xh7f8F25sO1a6seSgM8wxWBBUzeqBXPj1kUGW1evAdn0Cl7 I5zvPiOpObw1QF/fUR9QlZrpmqHq50YTvH/ba/c2aZX6Y4kH3dB+yB8FSvKCVqpXYhOoi fQMRJmhBGGHgv4a0sfu//HO678+aPAeBD01EVrafN3/CEYOTwQOaIMlGYqbvuPMqXBx2W yzpEjNdpeZp84n8GVJPwwgQnjsjQG1BqQFfGrutOgpOqjCXgi/NaDn/Gw/4A4zW0/YQ== ARC-Authentication-Results: i=1; mta-gglp-ksl-1; spf=pass smtp.mailfrom=savannah.gnu.org; dkim=none; dmarc=pass header.from=gnu.org; arc=none smtp.remote-ip=129.22.103.211 Authentication-Results: mta-gglp-ksl-1; spf=pass (mta-gglp-ksl-1.case.edu: domain of savannah.gnu.org designates 209.51.188.113 as permitted sender) smtp.mailfrom=savannah.gnu.org ; dkim=none (no DKIM signatures found); dmarc=pass (p=NONE sp=Undefined pct=100 dis=NONE) header.from=gnu.org; Received-SPF: Pass (mta-gglp-ksl-1.case.edu: domain of savannah.gnu.org designates 209.51.188.113 as permitted sender) client-ip=209.51.188.113 Received: from mpv-in-cfd-1.case.edu (mpv-in-cfd-1.case.edu [129.22.103.211]) by mta-gglp-ksl-1.case.edu (Postfix) with ESMTPS id A467AA805F9 for <[email protected]>; Thu, 18 Jun 2026 16:16:39 -0400 (EDT) Received: from frontend2.savannah.gnu.org (EHLO frontend2.savannah.gnu.org) ([209.51.188.113]) by mpv-in-cfd-1.case.edu (MOS 4.4.8-GA FastPath queued) with ESMTP id RUH92592; Thu, 18 Jun 2026 16:16:39 -0400 (EDT) Received: by frontend2.savannah.gnu.org (Postfix, from userid 33) id A1098120C50; Thu, 18 Jun 2026 16:16:38 -0400 (EDT) To: Chet Ramey <[email protected]> Subject: [bug #68453] bash 5.3 on macOS (Homebrew): inconsistent locale handling e.g. in printf builtin From: Chet Ramey <[email protected]> X-Apparently-From: Savane authenticated user chet X-Savane-Server: savannah.gnu.org:443 2001:470:142:5::113 X-Savane-Version: 3.17-c36938be85ff6c1b727bc7dd7fd30e48f9142870 Source-Code-Offer: AGPL NOTICE You can download the corresponding source code of Savane at https://savannah.gnu.org/source/savane-c36938be85ff6c1b727bc7dd7fd30e48f9142870.tar.gz X-Savane-Project: bash X-Savane-Tracker: bugs X-Savane-Item-ID: 68453 Message-Id: <[email protected]> References: <[email protected]> <[email protected]> In-Reply-To: <[email protected]> Reply-To: 2590-bugs-savannah <[email protected]> MIME-Version: 1.0 Content-Type: MULTIPART/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; BOUNDARY="8323329-846930886-1781813798=:1173942" Content-Disposition: inline Date: Thu, 18 Jun 2026 16:16:38 -0400 (EDT) X-Mirapoint-Received-SPF: 209.51.188.113 frontend2.savannah.gnu.org [email protected] 2 pass --8323329-846930886-1781813798=:1173942 Content-Type: TEXT/plain; CHARSET=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Content-Disposition: inline Update of bug #68453 (group bash):=0A=0A Status: = None =3D> Need Info=0A=0A ____________________________________= ___________________=0A=0AFollow-up Comment #1:=0A=0AThe example doesn't sho= w that LC_NUMERIC is unset, but that the locale=0Avariables are not exporte= d. They may or may not be set; the example just=0Adoesn't show it. If you w= ant to see what the bash process has, replace `env'=0Ain your example with = `set'.=0A=0AIf LC_NUMERIC is set but not exported, it will affect the bash = process but not=0Achild processes.=0A=0AMy macOS sessions don't have any LC= _ variables set, but I don't know what your=0Astartup files (or those insta= lled for you) contain.=0A=0AIf they're not set, bash uses the system's defa= ult locale: what you get when=0Ayou run setlocale(LC_ALL, "") without any v= ariables set.=0A=0AI can't reproduce your results with bash-5.3, but I am n= ot using Homebrew.=0A=0AThe first printf result implies that your default l= ocale is not en_US, or that=0Ayou have variables local to the bash process = that set it to something else.=0AThe examples you show explicitly setting L= C_NUMERIC support that.=0A=0A=0A=0A=0A=0A ______________________________= _________________________=0A=0ATo reply to this notification, you have two = options:=0A* In the Web UI at <https://savannah.gnu.org/bugs/?68453>.=0A* B= y email to 2590-bugs-savannah <[email protected]>, ONLY IF you pres= erve both=0A the 'display name' and the 'address specification' in the To:= header=0A AND you sign your email with a GPG key registered in your Savan= nah account=0A AND you include the following line in the reply:=0A=0A {sa= vane: user =3D 2590; tracker =3D bugs; item =3D 68453}=0A=0A_______________= ________________________________=0AMessage sent via Savannah=0Ahttps://sava= nnah.gnu.org/=0A --8323329-846930886-1781813798=:1173942 Content-Type: APPLICATION/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCajRSJgAKCRCqLAuaBUf3 TgaYAP9OQ6s4Pb0jgJGpZ//PQ5SwgiprlivtKBXd8cD8z+940gEAhIDD5Ezbn54w 8A+5bzRZzTbC9EOsjhyRT7etr/s3EQU= =wF2D -----END PGP SIGNATURE----- --8323329-846930886-1781813798=:1173942-- --------------v9KPDx2e0pFPtHEkBG49qo4p-- --------------Ki91dtyW52iTdDGmBQ0bRoFt-- --------------dw57K7p3h125daOqW0gEpQx9 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCajWauQUDAAAAAAAKCRC7WGnwZOp0q/NM AJ42lwwjCaIjdfIoBYAFzKk9gEBfXQCfah6/REtJrG1pbbrMRWDzRkiosac= =t/Py -----END PGP SIGNATURE----- --------------dw57K7p3h125daOqW0gEpQx9--