develooper Front page | perl.perl5.porters | Postings from September 2000

Re: unicode support and perl [ID 20000901.097]

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
September 16, 2000 01:37
Subject:
Re: unicode support and perl [ID 20000901.097]
Message ID:
E13aDI5-0000MS-00@roam1
Spider Boardman <spider@Orb.Nashua.NH.US> writes:
>On Fri, 15 Sep 2000 20:48:00 +0100, Simon Cozens wrote (in part):
>
>Simon> [20000901.097] undef . utf8
>Simon> I'd say you've fixed that; the patch looks great.
>Simon> Jarkko/Nick - could you apply?
>
>Actually, it doesn't look great.  It leaves the undef warning for
>that case, even though .= isn't supposed to generate one.  This
>one does the right thing here, both for the resulting string and
>the undef warning.  The right thing to do isn't to force POK on
>at the end, but rather at the beginning.

I will be applying _this_ one as above description sounds right to me.


>
>	--s.
>
>--- pp_hot.c.DIST	Mon Sep 11 06:01:59 2000
>+++ pp_hot.c	Fri Sep 15 16:15:25 2000
>@@ -163,6 +163,10 @@ PP(pp_concat)
> 		/* Take a copy since we're about to overwrite TARG */
> 		olds = s = (U8*)savepvn((char*)s, len);
> 	    }
>+	    if (SvGMAGICAL(left))
>+		mg_get(left);
>+	    else if (!SvOK(left) && SvTYPE(left) <= SVt_PVMG)
>+		sv_setpv(left, "");	/* Suppress warning. */
>             l = (U8*)SvPV(left, targlen);
>             if (TARG != left)
>                 sv_setpvn(TARG, (char*)l, targlen);
-- 
Nick Ing-Simmons


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