summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-05-29 12:16:23 +0100
committerDavid Mitchell <davem@iabyn.com>2011-05-29 20:21:53 +0100
commit75645721ec0bf7e29d35fd08c19b30c0ac877f1c (patch)
treeb3e117c6b83ad7c573c79d83706c3cc2c2734e74
parentacb25fddc9e86e87874ef43e6d2dd7a317e4bda7 (diff)
downloadperl-75645721ec0bf7e29d35fd08c19b30c0ac877f1c.tar.gz
pp_formline: make FF_LITERAL use item_is_utf8 flag
This is in preparation for merging with the FF_LINEGLOB code. Should be no change in functionality.
-rw-r--r--pp_ctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 2f0ddcd2fe..335e6dd9da 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -605,7 +605,8 @@ PP(pp_formline)
case FF_LITERAL:
arg = *fpc++;
- if (targ_is_utf8 && !SvUTF8(formsv)) {
+ item_is_utf8 = targ_is_utf8 ? !!DO_UTF8(formsv) : !!SvUTF8(formsv);
+ if (targ_is_utf8 && !item_is_utf8) {
char *s;
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
*t = '\0';
@@ -627,7 +628,7 @@ PP(pp_formline)
f += arg;
break;
}
- if (!targ_is_utf8 && DO_UTF8(formsv)) {
+ if (!targ_is_utf8 && item_is_utf8) {
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
*t = '\0';
sv_utf8_upgrade_flags_grow(PL_formtarget, 0, fudge + 1);