diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-09 23:41:01 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-09 23:41:01 +0000 |
commit | 1e2c6ed7b1d7c43be9a4422286be5333f4f3b7f8 (patch) | |
tree | ba0b412d4648f777cd8444a01d056e00d86358a3 /pp_sys.c | |
parent | fcb875d4741190d167d6a2773683d7421a2a5279 (diff) | |
download | perl-1e2c6ed7b1d7c43be9a4422286be5333f4f3b7f8.tar.gz |
Retract the UTF-8 filenames patch. This may be
better dealt with in Perl level, a la File::Spec
(since the whole mess is strongly filesystem-specific).
p4raw-id: //depot/perl@15835
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 30 |
1 files changed, 2 insertions, 28 deletions
@@ -3747,39 +3747,17 @@ PP(pp_open_dir) dSP; STRLEN n_a; char *dirname = POPpx; - char *dscp = NULL; - GV *gv; - register IO *io; - bool want_utf8 = FALSE; - - if (MAXARG == 3) - dscp = POPpx; - - gv = (GV*)POPs; - io = GvIOn(gv); + GV *gv = (GV*)POPs; + register IO *io = GvIOn(gv); if (!io) goto nope; - if (dscp) { - if (*dscp == ':') { - if (strnEQ(dscp + 1, "utf8", 4)) - want_utf8 = TRUE; - else - Perl_croak(aTHX_ "Unknown discipline '%s'", dscp); - } - else - Perl_croak(aTHX_ "Unknown discipline '%s'", dscp); - } - if (IoDIRP(io)) PerlDir_close(IoDIRP(io)); if (!(IoDIRP(io) = PerlDir_open(dirname))) goto nope; - if (want_utf8) - IoFLAGS(io) |= IOf_DIR_UTF8; - RETPUSHYES; nope: if (!errno) @@ -3817,8 +3795,6 @@ PP(pp_readdir) if (!(IoFLAGS(io) & IOf_UNTAINT)) SvTAINTED_on(sv); #endif - if (IoFLAGS(io) & IOf_DIR_UTF8 && !IN_BYTES) - SvUTF8_on(sv); XPUSHs(sv_2mortal(sv)); } } @@ -3834,8 +3810,6 @@ PP(pp_readdir) if (!(IoFLAGS(io) & IOf_UNTAINT)) SvTAINTED_on(sv); #endif - if (IoFLAGS(io) & IOf_DIR_UTF8) - sv_utf8_upgrade(sv); XPUSHs(sv_2mortal(sv)); } RETURN; |