Hi list,
using a french locale (fr_FR.UTF-8) breaks printing of floats:
IN: scratchpad 3.5 .
3,5.0

This is because the decimal point in french is ",", so the output of
(format-float) is "3,5" and fix-float explicitly checks for "."
The locale is forced by gtk to the environnement variables. However,
the old X11 backend also forced the locale (in basis/x11/x11.factor)
so this is should not be new with the gtk backend..

So I guess the best solution is to force LC_NUMERIC to a locale that
has a "." as the numeric separator right after gtk_init (for example
set_locale LC_NUMERIC "C").
Here's a patch that does that: http://paste.factorcode.org/paste?id=2595

Please feel free to modify/improve the patch...
Jon

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to