summaryrefslogtreecommitdiff
path: root/pod/perllocale.pod
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-07-08 14:04:45 -0600
committerKarl Williamson <public@khwilliamson.com>2013-07-09 22:23:24 -0600
commitccd65d51403426e176072af492d832677521af9f (patch)
tree359542528a229d2014d01df0ad44a1d87768dde0 /pod/perllocale.pod
parenta77c16f7c797af630db968764807f48bed555b91 (diff)
downloadperl-ccd65d51403426e176072af492d832677521af9f.tar.gz
PATCH: [perl #38193] embedded perl always calls setlocale(LC_ALL,"")
This commit causes the locale initialization to skip calling setlocal(foo, "") if the environment variable PERL_SKIP_LOCALE_INIT is set. Instead, the setup code calls setlocale(LC_ALL, NULL) (plus other similar calls for the subcategories) in order to find out what the current locale is. The original poster for this ticket has a workaround for it which involves using a modified copy of Perl core code. This patch defines the C preprocessor variable HAS_SKIP_LOCALE_INIT that can be used by XS writers to discover if the current Perl version needs the workaround or not. I was unable to come up with a test for this patch that did not involve building extensive infrastructure for testing embedded Perl. That does not seem worth it for such a trivial patch. I tested by hand.
Diffstat (limited to 'pod/perllocale.pod')
-rw-r--r--pod/perllocale.pod3
1 files changed, 3 insertions, 0 deletions
diff --git a/pod/perllocale.pod b/pod/perllocale.pod
index d15d4f0939..d0d197f4b0 100644
--- a/pod/perllocale.pod
+++ b/pod/perllocale.pod
@@ -1368,6 +1368,9 @@ L<POSIX/isupper>, L<POSIX/isxdigit>, L<POSIX/localeconv>,
L<POSIX/setlocale>, L<POSIX/strcoll>, L<POSIX/strftime>,
L<POSIX/strtod>, L<POSIX/strxfrm>.
+For special considerations when Perl is embedded in a C program,
+see L<perlembed/Using embedded Perl with POSIX locales>.
+
=head1 HISTORY
Jarkko Hietaniemi's original F<perli18n.pod> heavily hacked by Dominic