delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/03/21/05:16:44

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <532C0332.8070107@unige.ch>
Date: Fri, 21 Mar 2014 10:15:30 +0100
From: Juergen Harms <juergen DOT harms AT unige DOT ch>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
To: <geda-user AT delorie DOT com>
Subject: [geda-user] LC_NUMERIC - problems due to decimal comma
X-Originating-IP: [89.217.11.193]
Reply-To: geda-user AT delorie DOT com

Starting a new thread to separate it from the "versioning" discussion.

I had remarked that two checks fail if a decimal comma is used rather 
than a decimal point (because LC_NUMERIC is set to - for instance - some 
german locale). The discussion referred to some older bugs, some of them 
fixed. It looks as if the bug in 20140316 is not a reversion; it looks 
like a new bug, but where the problem follows a pattern that is similar 
to that of the mentioned bugs.

How about a solution, that does (in src/main.c, right after the call to 
setlocale (LC_ALL,""); - it imports the locale from the environment) 
call setlocale (LC_NUMERIC,"en_US.UTF-8 )?

That solves the problem once and forever and avoids that similar 
problems might pop up with future versions - it does nothing else than 
account for the fact that pcb implicitely assumes that the decimal 
separator is a dot. This solution also avoids the need to check new 
versions against locales with different LC_NUMERIC

I did some checking on the use of LC_NUMERIC in different locales - most 
common locales use the comma, en_US and en_UK are the only important 
exceptions. So, this is not an isolated problem of some fancy 
environments, but a real issue.

- Raw text -


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