diff --git a/src/cmd/ksh93/sh/init.c b/src/cmd/ksh93/sh/init.c index ab1c05da4..6b9b513e6 100644 --- a/src/cmd/ksh93/sh/init.c +++ b/src/cmd/ksh93/sh/init.c @@ -485,7 +485,7 @@ static void init_radixpoint(void) } } nv_putv(np, val, flags, fp); - if(type==LC_ALL || type==LC_NUMERIC) + if(type==LC_ALL || type==LC_NUMERIC || type==LC_LANG) init_radixpoint(); if(CC_NATIVE!=CC_ASCII && (type==LC_ALL || type==LC_LANG || type==LC_CTYPE)) { diff --git a/src/cmd/ksh93/tests/locale.sh b/src/cmd/ksh93/tests/locale.sh index daa8a6e3c..5e9ac828d 100755 --- a/src/cmd/ksh93/tests/locale.sh +++ b/src/cmd/ksh93/tests/locale.sh @@ -415,5 +415,13 @@ then "(expected $(printf %q "$exp"); got $(printf %q "$got"))" fi +# ====== +(LANG=C_EU && LC_NUMERIC=C && let .5) || err_exit "radix point not updated by LC_NUMERIC" +(LANG=C && LC_NUMERIC=C_EU && let ,5) || err_exit "radix point not updated by LC_NUMERIC" +(LC_NUMERIC=C_EU && LC_ALL=C && let .5) || err_exit "radix point not updated by LC_ALL" +(LC_NUMERIC=C && LC_ALL=C_EU && let ,5) || err_exit "radix point not updated by LC_ALL" +(LC_ALL=C_EU && unset LC_ALL && LANG=C && let .5) || err_exit "radix point not updated by LANG" +(LC_ALL=C && unset LC_ALL && LANG=C_EU && let ,5) || err_exit "radix point not updated by LANG" + # ====== exit $((Errors<125?Errors:125))