Skip to content

Commit 64af2c9

Browse files
committed
ICU-20575 fix broken default locale mapping for C.UTF-8
- 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.
1 parent 711e7e0 commit 64af2c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

icu4c/source/common/uloc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,8 @@ typedef struct CanonicalizationMap {
464464
* different semantic kinds of transformations.
465465
*/
466466
static const CanonicalizationMap CANONICALIZE_MAP[] = {
467+
{ "c", "en_US_POSIX" }, /* POSIX name */
468+
{ "posix", "en_US_POSIX" }, /* POSIX name (alias of C) */
467469
{ "art_LOJBAN", "jbo" }, /* registered name */
468470
{ "hy__AREVELA", "hy" }, /* Registered IANA variant */
469471
{ "hy__AREVMDA", "hyw" }, /* Registered IANA variant */

0 commit comments

Comments
 (0)