summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-11 03:16:05 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-11 03:16:05 +0000
commitb7018214460794b1717c970bae422221c10f4634 (patch)
tree306c57ab313580e284474f47ac03ef565e447063 /pp_hot.c
parentc71f135dc8b214a7f302aedfa9ad2ec63490adc2 (diff)
downloadperl-b7018214460794b1717c970bae422221c10f4634.tar.gz
SvPV() (via mg_get() of sv_2pv()) can update the UTF8ness of the SVs.
p4raw-id: //depot/perl@7201
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 400350d02b..4ddb12ce69 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -167,13 +167,15 @@ PP(pp_concat)
U8 *l, *c, *olds = NULL;
STRLEN targlen;
s = (U8*)SvPV(right,len);
+ right_utf |= DO_UTF8(right);
if (TARG == right) {
/* Take a copy since we're about to overwrite TARG */
- olds = s = (U8*)savepvn((char*)s, len);
+ olds = s = (U8*)savepvn((char*)s, len);
}
if (!SvOK(left) && SvTYPE(left) <= SVt_PVMG)
sv_setpv(left, ""); /* Suppress warning. */
l = (U8*)SvPV(left, targlen);
+ left_utf |= DO_UTF8(left);
if (TARG != left)
sv_setpvn(TARG, (char*)l, targlen);
if (!left_utf)