-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Fix invalid Unix locale to Flutter locale (BCP-47) mapping #36512
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
4ddfaac
to
9bf3ae6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes lgtm. Is there a way we can test this? e.g. are we reading from an environment variable we could cache, set to something, then restore?
@robert-ancell Is this still on your radar? |
7f09350
to
8960174
Compare
Flutter locales use the BCP-47 format (https://www.rfc-editor.org/rfc/bcp/bcp47.txt), and Unix locales use a POSIX format. There is not a perfect mapping between them, see https://wiki.openoffice.org/wiki/LocaleMapping The current implementation is not correctly setting the appropriate optional fields, so remove that. There are likely some Unix locales that should set these fields, but these are best fixed by adding special cases for them as they are discovered. Fixes: flutter/flutter#111341
8960174
to
8b3eb49
Compare
Was forgotten about, but I've added a test now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…118852) * 27f6bbcb3 Fix invalid Unix locale to Flutter locale (BCP-47) mapping (flutter/engine#36512) * 7d40e77d0 Roll Skia from 69d8378097df to aedfc8695954 (4 revisions) (flutter/engine#38966)
…6512) Flutter locales use the BCP-47 format (https://www.rfc-editor.org/rfc/bcp/bcp47.txt), and Unix locales use a POSIX format. There is not a perfect mapping between them, see https://wiki.openoffice.org/wiki/LocaleMapping The current implementation is not correctly setting the appropriate optional fields, so remove that. There are likely some Unix locales that should set these fields, but these are best fixed by adding special cases for them as they are discovered. Fixes: flutter/flutter#111341
Flutter locales use the BCP-47 format (https://www.rfc-editor.org/rfc/bcp/bcp47.txt), and Unix locales use a POSIX format. There is not a perfect mapping between them, see https://wiki.openoffice.org/wiki/LocaleMapping
The current implementation is not correctly setting the appropriate optional fields, so remove that.
There are likely some Unix locales that should set these fields, but these are best fixed by adding special cases for them as they are discovered.
Fixes: flutter/flutter#111341
Pre-launch Checklist
writing and running engine tests.
///
).