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

CharacterDirectionOfLocale: Define if locales are maximized before lookup #89

Open
anba opened this issue Aug 5, 2024 · 0 comments
Open

Comments

@anba
Copy link
Contributor

anba commented Aug 5, 2024

The V8 implementation of CharacterDirectionOfLocale calls uloc_isRightToLeft and uloc_isRightToLeft adds likely subtags when no explicit script subtag is present. Notably likely subtags aren't added even when the script subtag is the special value Zzzz.

The spec should clarify if likely subtags are to be added and if yes, under which conditions likely subtags are added.

uloc_isRightToLeft behaviour for some inputs:

Locale Likely subtags added Locale for lookup Result
en Yes en-Latn-US left-to-right
en-GB Yes en-Latn-GB left-to-right
en-ZZ Yes en-Latn-US left-to-right
en-Latn No en-Latn left-to-right
en-Arab No en-Arab right-to-left
en-Zzzz No en-Zzzz left-to-right
en-Zzzz-ZZ No en-Zzzz-ZZ left-to-right
ar Yes ar-Arab-EG right-to-left
ar-ZZ Yes ar-Arab-EG right-to-left
ar-Zzzz No ar-Zzzz left-to-right

Maybe the spec should be rewritten to follow the steps mentioned here: unicode-org/icu4x#3172 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant