diff options
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); } |