diff options
author | David Mitchell <davem@iabyn.com> | 2011-05-29 12:16:23 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2011-05-29 20:21:53 +0100 |
commit | 75645721ec0bf7e29d35fd08c19b30c0ac877f1c (patch) | |
tree | b3e117c6b83ad7c573c79d83706c3cc2c2734e74 | |
parent | acb25fddc9e86e87874ef43e6d2dd7a317e4bda7 (diff) | |
download | perl-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |