We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11acc26 commit 42d4db3Copy full SHA for 42d4db3
locale.c
@@ -843,7 +843,16 @@ S_my_querylocale_i(pTHX_ const unsigned int index)
843
/* But we do have up-to-date values when we keep our own records
844
* (except some times in initialization, where we get the value from
845
* the system. */
846
- if (PL_curlocales[index] == NULL) {
+ 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) {
856
retval = stdized_setlocale(category, NULL);
857
PL_curlocales[index] = savepv(retval);
858
}
0 commit comments