Skip to content
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
Merged

Intl LC_NUMERIC use fallback if locale en_US not installed #11571

merged 1 commit into from Mar 31, 2017

Conversation

peterbo
Copy link
Contributor

@peterbo 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.

Fixes "Error in the display of localized numbers" #10594
@sgiehl
Copy link
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
Copy link
Contributor Author

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
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants