Closed Bug 1339119 Opened 8 years ago Closed 8 years ago

OSPreferences::GetSystemLocale incorrectly returns 'und' on macOS

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

The Mac implementation of ReadSystemLocales has a bug, such that it ignores the locale read from the system and passes an empty string to CanonicalizeLanguageTag, which ICU then canonicalizes to "und". Not helpful. The fix is trivial; we just failed to set the length of `buffer` properly.
Oops, obviously I overlooked this when we were doing bug 1333184. Good thing nobody is relying on it yet. :)
Attachment #8836761 - Flags: review?(gandalf)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8836761 - Flags: review?(gandalf) → review+
Great catch! I am building FX on Windows and Mac today to test the new APIs. :)
https://hg.mozilla.org/integration/mozilla-inbound/rev/2c2044bedc9e9ba7e892eea4ec47a2a8bfce36ba Bug 1339119 - Actually use the locale from macOS instead of throwing it away in OSPreferences::ReadSystemLocales. r=gandalf
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: