FAQ sync. (Ignoring the few URL differences for now.)
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index ea9a6a5..aa8fb77 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3817,8 +3817,8 @@ PP(pp_readdir)
            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));
        }
     }