| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Test case: env LANG=C.UTF-8 icuinfo should return: <param name="locale.default">en_US_POSIX</param>
<param name="locale.default.bcp47">en-US-u-va-posix</param>Before this bug, they return c and und respectively. |
Sorry, something went wrong.
|
I really don't like these mappings at this level. There has to be a way to handle "C.UTF-8" in the getDefaultLocale() code. |
Sorry, something went wrong.
|
FWIW, I believe this exacerbated the issue with the DateTimePatternGenerator (ICU-20558), as "C.UTF-8" would be treated as a default locale of root, rather than "en_US_POSIX". |
Sorry, something went wrong.
Markus, makes sense. I'll see what i can do. |
Sorry, something went wrong.
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Sorry, something went wrong.
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Sorry, something went wrong.
|
@markusicu PTAL at the updated approach. There was another bug, where aa@bb turned into aa_BB_BB (doubled…). I think C@PREEURO never worked (even back to 4.8). Not that important, but at least we should not overwrite the variant twice and be consistent. (I've updated the bug to mention this) |
Sorry, something went wrong.
|
Thanks for fixing it all via putil.cpp! Is the PR description still accurate? |
Sorry, something went wrong.
|
@markusicu welcome. the PR is accurate now (and the commit message already was) |
Sorry, something went wrong.
| // Over-allocate in case we replace "@" with "__". | ||
| char *correctedPOSIXLocale = static_cast<char *>(uprv_malloc(uprv_strlen(posixID) + 1 + 1)); | ||
| // Over-allocate in case we replace "@" with "__" or "C" with "en_US_POSIX" | ||
| char *correctedPOSIXLocale = static_cast<char *>(uprv_malloc(uprv_strlen(posixID) + 11 + 1)); |
There was a problem hiding this comment.
FYI +10 would suffice because en_US_POSIX has length 11 which is 10 longer than C.
Unless I am mis-counting.
Sorry, something went wrong.
There was a problem hiding this comment.
I think you are right.
Sorry, something went wrong.
Regression was in 1afef30 PR unicode-org#418 [ICU-20187] - We dropped the mapping from "C" in uloc_canonicalize, but then putil did not handle cases where a codepage was set (such as C.UTF-8). - Add an additional check in uprv_getDefaultLocaleID() for locales that end up as "C" or "POSIX" after removing codepage suffix. - Also fix regression where aa@bb would become aa__BB__BB (incorrectly doubled __BB)
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
- Floating patch for ICU 64.x - includes test case ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20575 Backport of: unicode-org/icu#634 Fixes: nodejs#27418
- Floating patch for ICU 64.x - includes test case ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20575 Backport of: unicode-org/icu#634 Fixes: #27418 PR-URL: #27435 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
- Floating patch for ICU 64.x - includes test case ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20575 Backport of: unicode-org/icu#634 Fixes: #27418 PR-URL: #27435 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
- Floating patch for ICU 64.x - includes test case ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20575 Backport of: unicode-org/icu#634 Fixes: #27418 PR-URL: #27435 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
- Floating patch for ICU 64.x - includes test case ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20575 Backport of: unicode-org/icu#634 Fixes: #27418 PR-URL: #27435 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist