develooper Front page | perl.perl5.porters | Postings from June 2002

Re: Another Unicode s/// buglet?

Thread Previous | Thread Next
From:
Hugo van der Sanden
Date:
June 26, 2002 09:52
Subject:
Re: Another Unicode s/// buglet?
Message ID:
200206261652.g5QGqPc19327@crypt.compulink.co.uk
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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About