- edited description
System (LC_NUMERIC) decimal separator not honored
When using the fr_CH.UTF-8
value for LC_NUMERIC
the decimal separator is set to ,
instead of .
.
I double checked and my system is configured properly, the decimal separator is .
in my locale:
env LC_NUMERIC=fr_CH.UTF-8 printf "%'.3f\n" 12345678.901
-> 12'345'678.901
If I start speedcrunch with the en_US.UTF-8
locale, I get the .
separator, so speedcrunch is affected by LC_NUMERIC
somehow.
I can workaround by overriding the decimal separator in the menu (as per https://bitbucket.org/heldercorreia/speedcrunch/issues/827/comma-decimal-separator ).
Using v0.12
Comments (6)
-
reporter -
We get the decimal separator for a locale from Qt. I also get
,
as a decimal separator forfr_CH
on Fedora 28 with Qt 5.10. If that's wrong, I think your best bet is to report a bug with Qt itself: https://bugreports.qt.io/secure/Dashboard.jspa -
reporter Yeah that's wrong, it should be a dot. But that's weird because speedcrunch is the only qt app showing this bug. I'll try to make a bug report upstream.
-
It's weird that other Qt apps behave differently. I ran some more experiments; Fedora 28, Qt 5.10, both Qt and Speedcrunch from the normal repositories:
[vagrant@fedora28 ~]$ LC_NUMERIC=de_DE python3 -c "from PyQt5.QtCore import QLocale; print(QLocale().decimalPoint())" , [vagrant@fedora28 ~]$ LC_NUMERIC=en_GB python3 -c "from PyQt5.QtCore import QLocale; print(QLocale().decimalPoint())" . [vagrant@fedora28 ~]$ LC_NUMERIC=de_CH python3 -c "from PyQt5.QtCore import QLocale; print(QLocale().decimalPoint())" . [vagrant@fedora28 ~]$ LC_NUMERIC=fr_CH python3 -c "from PyQt5.QtCore import QLocale; print(QLocale().decimalPoint())" ,
Qt evidently honours
LC_NUMERIC
in some fashion; it's just of the opinion that fr_CH uses,
(but de_CH is.
) so there's probably some data error somewhere. If I run Speedcrunch withLC_NUMERIC
and decimal separator set to System Default, it uses the same character. So I think this is conclusively a bug in Qt (or their underlying locale data). -
repo owner - changed status to closed
-
reporter Just for reference, I realized the bug was introduced with qt5
LC_NUMERIC=fr_CH python3 -c "from PyQt4.QtCore import QLocale; print(QLocale().decimalPoint())" .
That's why the other qt app I was using were not showing this bug, they use qt4.
- Log in to comment