From 75645721ec0bf7e29d35fd08c19b30c0ac877f1c Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sun, 29 May 2011 12:16:23 +0100 Subject: [PATCH] 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. --- pp_ctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pp_ctl.c b/pp_ctl.c index 2f0ddcd..335e6dd 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); -- 2.7.4