unpythonic.net Tags

Jeff Epler's blog

About me

I've been a computer programmer since I first started typing in program listings on a Commodore Vic 20 when I was about 8. My hobbies include electronics, CNC manufacturing, photography, beer and winemaking.

I live with my wife and lots of left-over parts from unfinished projects in Lincoln, Nebraska, USA.]

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-2024 Jeff Epler