www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/08/29/12:24:04

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 <apoelstra AT wpsoftware DOT net>
To: "Markus Hitter (mah AT jump-ing DOT de) [via geda-user AT delorie DOT com]" <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
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

--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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019