Jeff Epler's blog

6 March 2013, 13:59 UTC

Adventures in localization


When a linuxcnc developer reported testsuite failures, a fellow developer discovered that our tests don't run right in non-English locales—in particular, locales like de_DE where the decimal separator is "," instead of ".". But I'm not here to talk about how to fix the testsuite. Instead, get a load of this behavior inside a bash that was started with LC_ALL=C:
$ printf "%f\n" 1.23
1.230000
$ LC_ALL=de_DE.UTF-8 printf "%f\n" 1.23
1.230000
$ env LC_ALL=de_DE.UTF-8 printf "%f\n" 1.23
1,230000

read more…

All older entries
Website Copyright © 2004-2017 Jeff Epler