diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-31 00:57:42 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-31 00:57:42 +0000 |
commit | 9f4817dbf9f375fea5253c12557f39e3774b891c (patch) | |
tree | 5571dace6798f9f2ca01ccd6abbe009034758ad3 /toke.c | |
parent | 177cde4c6a7c3c42786feaab44e78d637bb4cb97 (diff) | |
download | perl-9f4817dbf9f375fea5253c12557f39e3774b891c.tar.gz |
Enable -Mencoding=foobar also for string literals.
p4raw-id: //depot/perl@12782
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1653,6 +1653,10 @@ S_scan_const(pTHX_ char *start) Perl_croak(aTHX_ "panic: constant overflowed allocated space"); SvPOK_on(sv); + if (PL_encoding && !has_utf8) { + Perl_sv_recode_to_utf8(aTHX_ sv); + has_utf8 = TRUE; + } if (has_utf8) { SvUTF8_on(sv); if (PL_lex_inwhat == OP_TRANS && PL_sublex_info.sub_op) { @@ -7734,3 +7738,4 @@ utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen) return count; } #endif + |