diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-07 14:51:04 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-04-07 14:51:04 +0000 |
commit | 735b7a62d039909fa334af8e05d4788f54c2c65a (patch) | |
tree | edbd2278cd43fa1471d1812ebf8b864fdd90a908 /ext/File | |
parent | 9b3032b7d9e3c8e820c1ad71015731661bd6d109 (diff) | |
download | perl-735b7a62d039909fa334af8e05d4788f54c2c65a.tar.gz |
Duh. If the input is a stream of UTF-8 bytes, all that's
needed is SvUTF8_on(), sv_utf8_upgrade() is quite bogus.
Now, where was my coffee mug...
p4raw-id: //depot/perl@15779
Diffstat (limited to 'ext/File')
-rw-r--r-- | ext/File/Glob/Glob.pm | 1 | ||||
-rw-r--r-- | ext/File/Glob/Glob.xs | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/ext/File/Glob/Glob.pm b/ext/File/Glob/Glob.pm index 4c34d380b0..1ae894f048 100644 --- a/ext/File/Glob/Glob.pm +++ b/ext/File/Glob/Glob.pm @@ -338,7 +338,6 @@ Unicode compatibility: The filenames returned will be marked as being in UTF-8 encoding of Unicode. Note that it is your responsibility to ascertain that the filesystem you are globbing in returns valid UTF-8 filenames. -The encoding pragma affects this feature, see L<encoding>. =head1 DIAGNOSTICS diff --git a/ext/File/Glob/Glob.xs b/ext/File/Glob/Glob.xs index 5d95666137..1bb5fc4392 100644 --- a/ext/File/Glob/Glob.xs +++ b/ext/File/Glob/Glob.xs @@ -63,8 +63,8 @@ PPCODE: strlen(pglob.gl_pathv[i]))); TAINT; SvTAINT(tmp); - if (pglob.gl_flags & GLOB_UTF8) - sv_utf8_upgrade(tmp); + if (pglob.gl_flags & GLOB_UTF8 && !IN_BYTES) + SvUTF8_on(tmp); PUSHs(tmp); } |