diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-05 19:08:37 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-05 19:08:37 +0000 |
commit | 2f31ce7514c4aa5e63439203b688762243ac5b01 (patch) | |
tree | e0c34611351697766f00878590b6abf134e66bda /toke.c | |
parent | 9fdbfc113dab517e9adaec9b2bdb304801f9ed20 (diff) | |
download | perl-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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |