needed is SvUTF8_on(), sv_utf8_upgrade() is quite bogus.
Now, where was my coffee mug...
p4raw-id: //depot/perl@15779
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
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);
}
In three-argument form the middle argument may be C<:utf8> to force
the filenames returned by readdir() to be in UTF-8 encoding of Unicode.
This naturally works only if your filesystem returns UTF-8 filenames.
-The encoding pragma affects this feature, see L<encoding>.
=item ord EXPR
if (!(IoFLAGS(io) & IOf_UNTAINT))
SvTAINTED_on(sv);
#endif
- if (IoFLAGS(io) & IOf_DIR_UTF8)
- sv_utf8_upgrade(sv);
+ if (IoFLAGS(io) & IOf_DIR_UTF8 && !IN_BYTES)
+ SvUTF8_on(sv);
XPUSHs(sv_2mortal(sv));
}
}