Skip to content

Commit 42d4db3

Browse files
committed
see if this helps
1 parent 11acc26 commit 42d4db3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

locale.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,16 @@ S_my_querylocale_i(pTHX_ const unsigned int index)
843843
/* But we do have up-to-date values when we keep our own records
844844
* (except some times in initialization, where we get the value from
845845
* the system. */
846-
if (PL_curlocales[index] == NULL) {
846+
if (index == LC_ALL_INDEX_) {
847+
if (PL_cur_LC_ALL == NULL) {
848+
retval = stdized_setlocale(LC_ALL, NULL);
849+
PL_cur_LC_ALL = savepv(retval);
850+
}
851+
else {
852+
retval = PL_cur_LC_ALL;
853+
}
854+
}
855+
else if (PL_curlocales[index] == NULL) {
847856
retval = stdized_setlocale(category, NULL);
848857
PL_curlocales[index] = savepv(retval);
849858
}

0 commit comments

Comments
 (0)