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

Nyall Dawson nyall.dawson at gmail.com
Sun Oct 1 16:21:37 PDT 2017


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


More information about the QGIS-Developer mailing list