X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Sat, 29 Aug 2015 09:23:09 -0700 From: Andrew Poelstra To: "Markus Hitter (mah AT jump-ing DOT de) [via geda-user AT delorie DOT com]" Subject: Re: [geda-user] National Language Support (NLS) now fixed. Message-ID: <20150829162308.GB18456@waterbear.ampedwireless> References: <55E1A647 DOT 5080306 AT jump-ing DOT de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HB7frlJYaPDRK8vk" Content-Disposition: inline In-Reply-To: <55E1A647.5080306@jump-ing.de> User-Agent: Mutt/1.5.23 (2014-03-12) Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --HB7frlJYaPDRK8vk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 29, 2015 at 02:32:07PM +0200, Markus Hitter (mah AT jump-ing DOT de) [= via geda-user AT delorie DOT com] wrote: > Folks, >=20 > it was a long standing issue that NLS support of pcb was kind of broken. = It was handled by environment variables like LC_ALL or LC_NUMERIC to values= of best guess and relying on this. >=20 > To the non-involved: well known functions like printf() and fprintf() cha= nge behaviour depending on these variables. They don't always put a '.' as = decimal separator, but the one the national language expects. Accordingly, = using such functions to write to files leads to different file contents, of= ten making them unusable for the tools they're intended for. Making printf(= ) & co. dependant on environment variables is a broken concept, still pcb h= appened to use it a lot. An issue almost invisible on english locales, afte= r all. >=20 > After some back and forth a bunch of functions replacing printf() were wr= itten which can (depending on modifiers) write in "file mode", i.e. with al= ways a '.' as decimal separator. That's pcb_printf(), pcb_fprintf() and pcb= _snprintf(), the modifier is a back-apostrophe (`). Not all my work, these = functions were there before, just without this generic file mode. >=20 > All tests in the testsuite pass now, independently on wether pcb is built= with NLS or not, and also independently from the users current locale. I t= hink this is the first time pcb achieved such a state. > Thanks a lot for this, and for your other improvements to pcb-printf! --=20 Andrew Poelstra Mathematics Department, University of Texas at Austin Email: apoelstra at wpsoftware.net Web: https://www.wpsoftware.net/andrew "When I came into my land, I did not understand: neither dry rot, nor the burn pile, nor the bark-beetle, nor the dry well, nor the black bear." -- Joanna Newsom --HB7frlJYaPDRK8vk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV4dxsAAoJEMWI1jzkG5fBqDoH/2TNqQNhiCLyfdvxAqNq4ww1 FHJtQmVh26L5gTxnWg1Tr2yjWjPqAZDxwdh63DItbX8LGkoYRdZnt/Tsj6SRsHYh Ho2KsrHgZDJGcgR3AFdCOYHeGWGAoPRmN4tZ2TuB5FhwN14LFvjwrZWxr+qF0tC/ xV061Uqd/7yNUl0h9J8k11z9IwnSXDd7fBBZJ7Z5APhrpB3tRXdFIGUz+EZXUR2c ghaQJKjoSL4EodOWAI3XRAlqaGoUabZSiokfp3+9/3WaTPQBpaWfN8Nf5D9Rng7D 4shGtnbug3RFTXW8WemxqomiTGX42bYG89OF1VVYQg3ebZAE8n4C+NuvSrwcR6U= =rhRQ -----END PGP SIGNATURE----- --HB7frlJYaPDRK8vk--