We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c0f20e commit 79d373dCopy full SHA for 79d373d
Modules/_localemodule.c
@@ -692,8 +692,17 @@ _locale_nl_langinfo_impl(PyObject *module, int item)
692
result = result != NULL ? result : "";
693
char *oldloc = NULL;
694
if (langinfo_constants[i].category != LC_CTYPE
695
- // gh-133740: Always change the locale for ALT_DIGITS
696
- && (item == ALT_DIGITS || !is_all_ascii(result))
+ // gh-133740: Always change the locale for ALT_DIGITS and ERA
+ && (
697
+#ifdef __GLIBC__
698
+# ifdef ALT_DIGITS
699
+ item == ALT_DIGITS ||
700
+# endif
701
+# ifdef ERA
702
+ item == ERA ||
703
704
+#endif
705
+ !is_all_ascii(result))
706
&& change_locale(langinfo_constants[i].category, &oldloc) < 0)
707
{
708
return NULL;
0 commit comments