p4raw-id: //depot/perl@13721
*d++ = UTF_TO_NATIVE(uv);
return d;
}
+ if (UNICODE_IS_SURROGATE(uv))
+ Perl_croak(aTHX_ "UTF-16 surrogate 0x%04"UVxf, uv);
#if defined(EBCDIC)
else {
STRLEN len = UNISKIP(uv);
return d;
}
if (uv < 0x10000) {
- if (UNICODE_IS_SURROGATE(uv))
- Perl_croak(aTHX_ "UTF-16 surrogate 0x%04"UVxf, uv);
*d++ = (( uv >> 12) | 0xe0);
*d++ = (((uv >> 6) & 0x3f) | 0x80);
*d++ = (( uv & 0x3f) | 0x80);