summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorInaba Hiroto <inaba@st.rim.or.jp>2003-02-10 09:04:51 +0900
committerJarkko Hietaniemi <jhi@iki.fi>2003-02-26 20:38:55 +0000
commit1bd51a4ce2ce8ac9d8d3503b73fce0e0fc8f8426 (patch)
tree13df2a5182a6b0a84b4a07e7b8305a34cea4e79d /toke.c
parent351208f1b69ff774788ddf0fb62571002594640e (diff)
downloadperl-1bd51a4ce2ce8ac9d8d3503b73fce0e0fc8f8426.tar.gz
Re: [PATCH] Re: format, PerlIO and utf8
Message-ID: <3E466E12.E5349D84@st.rim.or.jp> p4raw-id: //depot/perl@18785
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index 3e611e9066..bc84fda4c9 100644
--- a/toke.c
+++ b/toke.c
@@ -7617,6 +7617,12 @@ S_scan_formline(pTHX_ register char *s)
}
else
PL_lex_state = LEX_FORMLINE;
+ if (!IN_BYTES) {
+ if (UTF && is_utf8_string((U8*)SvPVX(stuff), SvCUR(stuff)))
+ SvUTF8_on(stuff);
+ else if (PL_encoding)
+ sv_recode_to_utf8(stuff, PL_encoding);
+ }
PL_nextval[PL_nexttoke].opval = (OP*)newSVOP(OP_CONST, 0, stuff);
force_next(THING);
PL_nextval[PL_nexttoke].ival = OP_FORMLINE;