summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-04-05 19:08:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-05 19:08:37 +0000
commit2f31ce7514c4aa5e63439203b688762243ac5b01 (patch)
treee0c34611351697766f00878590b6abf134e66bda /toke.c
parent9fdbfc113dab517e9adaec9b2bdb304801f9ed20 (diff)
downloadperl-2f31ce7514c4aa5e63439203b688762243ac5b01.tar.gz
Heredocs and use encoding didn't work for SJIS;
patch from Inaba Hiroto. p4raw-id: //depot/perl@19146
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index 1b6baaaaff..0009d62e6e 100644
--- a/toke.c
+++ b/toke.c
@@ -6688,8 +6688,12 @@ retval:
Renew(SvPVX(tmpstr), SvLEN(tmpstr), char);
}
SvREFCNT_dec(herewas);
- if (UTF && !IN_BYTES && is_utf8_string((U8*)SvPVX(tmpstr), SvCUR(tmpstr)))
- SvUTF8_on(tmpstr);
+ if (!IN_BYTES) {
+ if (UTF && is_utf8_string((U8*)SvPVX(tmpstr), SvCUR(tmpstr)))
+ SvUTF8_on(tmpstr);
+ else if (PL_encoding)
+ sv_recode_to_utf8(tmpstr, PL_encoding);
+ }
PL_lex_stuff = tmpstr;
yylval.ival = op_type;
return s;