New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intl LC_NUMERIC use fallback if locale en_US not installed #11571

Merged
merged 1 commit into from Mar 31, 2017

Conversation

Projects
None yet
3 participants
@peterbo
Contributor

peterbo commented Mar 31, 2017

Fixes "Error in the display of localized numbers" #10594 / #10596

Problem: On a few systems, only local locales are installed / enabled. Therefore, setting LC_NUMERIC to "en_US.UTF-8" silently fails and numerics are juggled in local manner (1,0 vs 1.0). This makes the NumberFormatter fail on those numbers.

The locale C/C.UTF-8/POSIX is present on nearly all systems, so we add those to the setlocale fallbacks.

NumberFormatter usw fallback if locale en_US not installed
Fixes "Error in the display of localized numbers" #10594
@sgiehl

This comment has been minimized.

Member

sgiehl commented Mar 31, 2017

Good find Peter. Hope we can get this in upcoming 3.0.3. Maybe anyone can confirm this fix works?
Otherwise need to set up a virtual box to check that as soon as I have some time for it

@sgiehl sgiehl added this to the 3.0.3 milestone Mar 31, 2017

@peterbo

This comment has been minimized.

Contributor

peterbo commented Mar 31, 2017

I tried this fix on a customer's instance where it also occured, without installing locale "en_US.UTF-8". It worked there. The fix will only fail on systems where neither en_US nor C is present (but I don't know if this can happen at all).

@sgiehl sgiehl merged commit eb121d6 into matomo-org:3.x-dev Mar 31, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@mattab mattab added the Bug label Apr 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment