by Inaba Hiroto.
p4raw-id: //depot/perl@8517
if (hibit) {
STRLEN len;
+
if (SvREADONLY(sv) && SvFAKE(sv)) {
sv_force_normal(sv);
s = SvPVX(sv);
{
if (SvPOK(sv) && SvUTF8(sv)) {
if (SvCUR(sv)) {
- char *c = SvPVX(sv);
- STRLEN len = SvCUR(sv);
+ char *s;
+ STRLEN len;
- if (!utf8_to_bytes((U8*)c, &len)) {
+ if (SvREADONLY(sv) && SvFAKE(sv))
+ sv_force_normal(sv);
+ s = SvPV(sv, len);
+ if (!utf8_to_bytes((U8*)s, &len)) {
if (fail_ok)
return FALSE;
else {