diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-28 22:55:24 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-28 22:55:24 +0000 |
commit | 0a3788024daeeff27b99d9992ad4f1eb40663b1a (patch) | |
tree | c4f94dd14dd9658f90c215aae62e09aeeae00c94 /gv.c | |
parent | 515f097614eaa79c1f9c40647e200dc7dc7dd619 (diff) | |
download | perl-0a3788024daeeff27b99d9992ad4f1eb40663b1a.tar.gz |
Add the encoding pragma to control the "upgrade"
from the native eight bit data to Unicode.
TODO: \x.. and \0... literals. \N{}. chr()? ord()?
p4raw-id: //depot/perl@12750
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -887,7 +887,6 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) case '\001': /* $^A */ case '\003': /* $^C */ case '\004': /* $^D */ - case '\005': /* $^E */ case '\006': /* $^F */ case '\010': /* $^H */ case '\011': /* $^I, NOT \t in EBCDIC */ @@ -901,6 +900,11 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) break; sv_setiv(GvSV(gv), (IV)(IoFLAGS(GvIOp(PL_defoutgv)) & IOf_FLUSH) != 0); goto magicalize; + case '\005': /* $^E && $^ENCODING */ + if (len > 1 && strNE(name, "\005NCODING")) + break; + goto magicalize; + case '\017': /* $^O & $^OPEN */ if (len > 1 && strNE(name, "\017PEN")) break; |