On 05/01/2011 10:58 PM, Peter Clifton wrote:
> On Sat, 2011-04-02 at 20:09 +0000, g...@gpleda.org wrote:
>>
>> +       // force gerbv to output decimals as dots (not commas for other 
>> locales)
>> +       setlocale(LC_NUMERIC, "en_US");
>> +       
> 
> en_US is not a good default for this, as it is a little biased ;)
>  It might also not work if the user doesn't have en_US installed.
> 
> I think LC_NUMERIC, "C" should actually give the required effect, as the
> portable C locale.

There are some places in the code that already does that. Grep for
setlocale in the src/*.c.


>> +       // return to the default locale
>> +       setlocale(LC_NUMERIC, "C");
> 
> I don't think that is what it does.. setlocale(LC_ALL, ""); should
> restore to the default. Perhaps setlocale(LC_NUMERIC, ""); would also
> work on just the numeric bits.

I don't think it is necessary to restore, since I think the setlocale is
only local for the program. Correct me if I am wrong.

Regards,
/Stefan

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Gerbv-devel mailing list
Gerbv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gerbv-devel

Reply via email to