diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-01-16 01:58:39 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-01-16 01:58:39 +0000 |
commit | fde18df140d5f64815bdd632a127ecd5ce3d97fa (patch) | |
tree | 80f64f24787f44508939d3f4b0912ac97d9cf9dc /perl.c | |
parent | cd2d1bacbf7960cece81f64bfbaaedda360c78aa (diff) | |
download | perl-fde18df140d5f64815bdd632a127ecd5ce3d97fa.tar.gz |
Make the locale-induced UTF-8-ification of STD fhs
and the default file open layer explicit (either -C
or PERL_UTF8_LOCALE), instead of implicit (and unasked-for).
p4raw-id: //depot/perl@18490
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1355,10 +1355,11 @@ print \" \\@INC:\\n @INC\\n\";"); if (!PL_do_undump) init_postdump_symbols(argc,argv,env); - /* PL_wantutf8 is conditionally turned on by + /* PL_utf8locale is conditionally turned on by * locale.c:Perl_init_i18nl10n() if the environment - * look like the user wants to use UTF-8. */ - if (PL_wantutf8) { /* Requires init_predump_symbols(). */ + * look like the user wants to use UTF-8. + * PL_wantutf8 is turned on by -C or by $ENV{PERL_UTF8_LOCALE}. */ + if (PL_utf8locale && PL_wantutf8) { /* Requires init_predump_symbols(). */ IO* io; PerlIO* fp; SV* sv; @@ -2156,7 +2157,7 @@ Perl_moreswitches(pTHX_ char *s) return s + numlen; } case 'C': - PL_widesyscalls = TRUE; + PL_wantutf8 = TRUE; /* Can be set earlier by $ENV{PERL_UTF8_LOCALE}. */ s++; return s; case 'F': @@ -3397,7 +3398,7 @@ Perl_init_argv_symbols(pTHX_ register int argc, register char **argv) for (; argc > 0; argc--,argv++) { SV *sv = newSVpv(argv[0],0); av_push(GvAVn(PL_argvgv),sv); - if (PL_widesyscalls) + if (PL_wantutf8) (void)sv_utf8_decode(sv); } } |