perl-unicode

Re: Another Unicode s/// buglet?

2002-06-26 10:30:05
I wrote:
:Attached patch passes all existing tests here, as well as some new ones.

Whoops, crossed in the post. My patch was written against @17356;
it may not be necessary after #17358, but the extra tests might be
worth keeping.

I notice that you've used this code:
    SV *nsv = newSVpvn(c, clen);
    if (PL_encoding)
        sv_recode_to_utf8(nsv, PL_encoding);
    else
        sv_utf8_upgrade(nsv);

Should I be using the same approach in regexec.c:S_to_utf8_substr()
and S_to_byte_substr()? They currently don't know about PL_encoding.
Also, does your version need the additional
    SvSetMagicSV(nsv, dstr)
that I borrowed from there in my version of the patch?

Hugo

<Prev in Thread] Current Thread [Next in Thread>