[QGIS-Developer] Value entry using comma as decimal separator?

Richard Duivenvoorde rdmailings at duif.net
Sat Jul 8 00:58:55 PDT 2017


On 08-07-17 01:11, Nyall Dawson wrote:

> It's a trivial change to make to get the spin boxes to accept the
> local decimal separator, but this would prevent users entering "5.5"
> in those locales.
> 
> Can someone from one of these affected regions let me know what the
> correct behavior should be? I don't want to make the change if it
> breaks entry of 5.5 and that's the standard used in those locales.

My personal view:

In The Netherlands we also use comma as a decimal separator (don't most
european countries do?), and though I never use the Dutch locale myself,
I know ALL governmental organisations I've been run the Dutch
QGIS/localse just because Windows there is in Dutch (and set the Dutch
locale).

I also know in the Spreadsheet world this gives A LOT of trouble because
most average users are not even aware what 'locale' they are using... So
people sending a us-locale spreadsheet to a dutch-locale user is often
in trouble....

This makes for example so that in modern Banking web applications they
check and you can use both , and . as decimal separator (probably there
is some heuristic in which they check:
- if there is only one type of separator
- if there is one, and it is just 2 position from the end
- it is used as decimal separator
etc etc
But... that is easier when you are only doing currency numbers...

I would not try to fight this locale war, or try to be smarter then
Qt/Windows:
IF people use a 'comma'-locale, they should use comma.
IF they do not like that: use us-locale

It is the same problem with the character encoding in shapefiles. People
are not aware of what they do, but 'we' as part of the Qt or Windows
should not try to be smarter then that world we are part of.

Untill the rest of the world come to their senses and start using the
comma as separator, use 24hr clocks (well preferably 100...), meters,
kilograms etc etc...

Regards,

Richard Duivenvoorde


More information about the QGIS-Developer mailing list