3 ms·
Although printf is affected, not every aspect of printf is affected. IIRC, one nasty area is floating-point numbers, when you're in the locale that doesn't hav
by kazinator 5y ago
Although printf is affected, not every aspect of printf is affected.
IIRC, one nasty area is floating-point numbers, when you're in the locale that doesn't have . as the decimal point, but your program's requirements are such that . is the decimal point.
Like, oh, you're writing a programming language which specifies that.
Like, you know, C does for floating-point constants.
- matheusmoreira 5y ago> floating-point numbers, when you're in the locale that doesn't have . as the decimal point I live in such a country. It's subtle but constant pain even for average users. Even the Windows calculator screws this up: it only accepts either . or , as input instead of both. > Like, oh, you're writing a programming language which specifies that. Yeah. The commit message I linked has one such example. > This is still less bad than that time when libquivi fucked up OpenGL rendering > calling a libquvi function would load some proxy abstraction library, which in turn loaded a KDE plugin > which in turn called setlocale() because Qt does this > made the mpv GLSL shader generation code emit "," instead of "." for numbers > and of course only for users who had that KDE plugin installed, and lived in a part of the world where "." is not used as decimal separator Just imagine debbuging this insanity.
- jcelerier 5y agoYeah, as a french it bit me a lot of times. Now I just LC_ALL=C.UTF-8, french translations of english software are shitty most of the time anyways and in particular for dev tools.
- ygra 5y ago> Even the Windows calculator screws this up: it only accepts either . or , as input instead of both. It does, however, always accept the . key on the numeric keypad, so many users won't really notice the discrepancy.