summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-06-11 03:21:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-11 03:21:53 +0000
commitec71e7703a2a0c5dfad1dd7ebe4daee483e3fcd7 (patch)
treed5644861513ea4bce5beadb2264e5aeea01fe8e2 /locale.c
parent29e130bc0939f7f9a0c1c9517517b25576893e3f (diff)
downloadperl-ec71e7703a2a0c5dfad1dd7ebe4daee483e3fcd7.tar.gz
Make UTF-8 locales effective only if PerlIO has been
defined (ignore UTF-8 locales silently if no PerlIO). p4raw-id: //depot/perl@17180
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/locale.c b/locale.c
index 1abda3ea6c..bb497bcb3f 100644
--- a/locale.c
+++ b/locale.c
@@ -473,8 +473,10 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
#endif /* USE_LOCALE */
+#ifdef USE_PERLIO
{
- /* Set PL_wantut8 to TRUE if any of the following are true:
+ /* Set PL_wantut8 to TRUE if using PerlIO _and_
+ any of the following are true:
- nl_langinfo(CODESET) contains /^utf-?8/i
- $ENV{LANGUAGE} contains /^utf-?8/i (only if using glibc)
- $ENV{LC_CALL} contains /^utf-?8/i
@@ -518,6 +520,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
if (wantutf8)
PL_wantutf8 = TRUE;
}
+#endif
#ifdef USE_LOCALE_CTYPE
if (curctype != NULL)