Skip to content

Commit

Permalink
ICU-20575 fix broken default locale mapping for C.UTF-8
Browse files Browse the repository at this point in the history
- Partial revert of 1afef30
- PR#418 incorrectly dropped the mapping from C to en-us-POSIX
- For cases where a codepage was set (such as C.UTF-8) the
  hard coded fallback logic in putil.cpp would not activate.
- The “strcmp("C", …)” in putil.cpp is intended to detect specific
  platform behavior, it is not a general mapping.
  • Loading branch information
srl295 committed Apr 25, 2019
1 parent 711e7e0 commit 64af2c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions icu4c/source/common/uloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ typedef struct CanonicalizationMap {
* different semantic kinds of transformations.
*/
static const CanonicalizationMap CANONICALIZE_MAP[] = {
{ "c", "en_US_POSIX" }, /* POSIX name */
{ "posix", "en_US_POSIX" }, /* POSIX name (alias of C) */
{ "art_LOJBAN", "jbo" }, /* registered name */
{ "hy__AREVELA", "hy" }, /* Registered IANA variant */
{ "hy__AREVMDA", "hyw" }, /* Registered IANA variant */
Expand Down

0 comments on commit 64af2c9

Please # to comment.