[QGIS-Developer] QGIS and QLocale handling not used?

Andreas Neumann a.neumann at carto.net
Sun Oct 1 22:47:28 PDT 2017


Hi, 

It is really a mess. F.e. in Switzerland some cantons use the comma,
some the decimal point (officially). On the federal level they use the
comma - I guess this is what Switzerlands official positions is: use the
comma as decimal separator. BUT: in practice most people I know use the
point as a decimal separator. See also
https://en.wikipedia.org/wiki/Decimal_mark 

What a mess. Probably we are the only country listed in both sections:
comma and the point (depending on the province). I don't know who had
this brilliant idea that some provinces would use the one and some the
other. 

If someone works on locale changes, I would propose that there would be
a separate setting where people can choose if they want the point or the
comma as a decimal separator. 

Thanks and greetings, 

Andreas 

On 2017-10-02 01:21, Nyall Dawson wrote:

> On 30 September 2017 at 21:22, Richard Duivenvoorde <rdmailings at duif.net> wrote: On 30-09-17 10:18, Richard Duivenvoorde wrote:
> 
> Given QGIS is used in so many different languages/locales, I think QGIS3
> is the right time to handle this in a proper way?
> 
> Or is my testing just plain wrong :-) 
> Ok, see comments at the issue [0], I think there is nothing wrong with
> the separator handling of the delimitedtextprovider.
> It would be cool though if the dialog would check the 'Decimal separator
> is comma' when the locale is european (and maybe show the locale there...)
> 
> And my test was plain wrong: 1,0 will NEVER be a valid float in Python.
> '1,0' is, if you have the right locale, see [1]
> Note that this is about plain Python. In our case there is Qt in between...
> 
> I think though that changing the locale and then asking for the locale
> in QGIS should show the locale used.
> 
> I hope somebody can tell something about this?

I tried to clear up some of these issues during the Nodebo hackfest,
but:

1. coming from a locale which uses the NORMAL "." as decimal
separator, I have no idea what the expected/proper behavior should be
for locales which use ","

2. no-one I asked from these locales could even give me a definitive
answer about what the correct behavior is

So I quickly decided to let someone else handle this mess ;)

Nyall
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171002/6b588ed3/attachment-0001.html>


More information about the QGIS-Developer mailing list