Skip to content

Commit 7a42e09

Browse files
committed
locale.c: ALT_DIGITS should be empty not "0" when none
This and the next commit fix the incorrect behavior that perl has always had for nl_langinfo(ALT_DIGITS). If there are no alternate digits, an empty string is returned by nl_langinfo when there are no such alternate digits. This should also be the case on platforms where we emulate nl_langinfo, but instead "0" was being returned. This commit makes things consistent. The next commit adds tests
1 parent e0993ac commit 7a42e09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

locale.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6830,7 +6830,7 @@ S_emulate_langinfo(pTHX_ const int item,
68306830
# endif
68316831
# if defined(WIN32) || ! defined(USE_LOCALE_TIME) || ! defined(HAS_STRFTIME)
68326832

6833-
case ALT_DIGITS: retval = "0"; break;
6833+
case ALT_DIGITS: retval = ""; break;
68346834
# else
68356835
case ALT_DIGITS:
68366836
format = "%Ow"; /* Find the alternate digit for 0 */

0 commit comments

Comments
 (0)