[ 9126]
#ifdef'ed out code to make packed side of pack/unpack
octets. (i.e. pack('U') => encode_utf8).
p4raw-link: @9126 on //depot/perlio:
d815558d76680455c3455ca148e9c280db95eb71
p4raw-id: //depot/perl@9135
p4raw-integrated: from //depot/perlio@9134 'copy in' pp.c (@9096..)
#define ISUUCHAR(ch) (memchr(PL_uuemap, (ch), sizeof(PL_uuemap)-1) || (ch) == ' ')
#endif
+
PP(pp_unpack)
{
dSP;
STRLEN llen;
STRLEN rlen;
register char *pat = SvPV(left, llen);
-#if 0
+#ifdef PACKED_IS_OCTETS
/* Packed side is assumed to be octets - so force downgrade if it
has been UTF-8 encoded by accident
*/
patcopy++;
continue;
}
+#ifndef PACKED_IS_OCTETS
if (datumtype == 'U' && pat == patcopy+1)
SvUTF8_on(cat);
+#endif
if (datumtype == '#') {
while (pat < patend && *pat != '\n')
pat++;