delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
X-Recipient: | geda-user AT delorie DOT com |
X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=simple; d=mail.ud03.udmedia.de; h= |
message-id:date:from:mime-version:to:subject:content-type | |
:content-transfer-encoding; s=beta; bh=NB4I3kEsXvmthugv/8od9x2as | |
6moFNfPgmxo5Dd3qW8=; b=Bqg9x6l1IJXp2OZvIr312HTfRYoaUmrjViuo+a5GB | |
3Cc1VayjNy7313WIzeSsIwMR/t+xSpxTOYwOP9NMPhWSBZgq/LMicpEGUfpahD/O | |
fH0TWzXZqCKHGopzZJzlQH0HTwz+dOl0r6o8Cqj9bAlYC8blikg2+GR9FGNdb+XU | |
YU= | |
Message-ID: | <55E1A647.5080306@jump-ing.de> |
Date: | Sat, 29 Aug 2015 14:32:07 +0200 |
From: | "Markus Hitter (mah AT jump-ing DOT de) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 |
MIME-Version: | 1.0 |
To: | geda-user AT delorie DOT com |
Subject: | [geda-user] National Language Support (NLS) now fixed. |
Reply-To: | geda-user AT delorie DOT com |
Folks, 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. To the non-involved: well known functions like printf() and fprintf() change 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, often making them unusable for the tools they're intended for. Making printf() & co. dependant on environment variables is a broken concept, still pcb happened to use it a lot. An issue almost invisible on english locales, after all. After some back and forth a bunch of functions replacing printf() were written which can (depending on modifiers) write in "file mode", i.e. with always 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. 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 think this is the first time pcb achieved such a state. Enjoy, Markus -- - - - - - - - - - - - - - - - - - - - Dipl. Ing. (FH) Markus Hitter http://www.jump-ing.de/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |