octets. (i.e. pack('U') => encode_utf8).
p4raw-id: //depot/perlio@9126
#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++;