diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-06 15:02:20 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-06 15:02:20 +0000 |
commit | 0effba8c71e3da7d9cf86c7baa2d721067b4761d (patch) | |
tree | ec7a985406b3dda1093aebee8a2d8f3bf03ac45c | |
parent | c983aa87c110c324b4ec293f7b7fd915959a9597 (diff) | |
download | perl-0effba8c71e3da7d9cf86c7baa2d721067b4761d.tar.gz |
EBCDIC: the encoding pragma would need some rethinking,
probably a pass of EBCDIC->Unicode mapping. For now,
disable it on EBCDIC.
p4raw-id: //depot/perl@14572
-rw-r--r-- | lib/encoding.pm | 9 | ||||
-rw-r--r-- | lib/encoding.t | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/encoding.pm b/lib/encoding.pm index 642726da7e..1504a92639 100644 --- a/lib/encoding.pm +++ b/lib/encoding.pm @@ -4,6 +4,13 @@ our $VERSION = '1.00'; use Encode; +BEGIN { + if (ord("A") == 193) { + require Carp; + Carp::croak "encoding pragma does not support EBCDIC platforms"; + } +} + sub import { my ($class, $name) = @_; $name = $ENV{PERL_ENCODING} if @_ < 2; @@ -94,6 +101,8 @@ For native multibyte encodings (either fixed or variable length) the current implementation of the regular expressions may introduce recoding errors for longer regular expression literals than 127 bytes. +The encoding pragma is not supported on EBCDIC platforms. + =head1 SEE ALSO L<perlunicode>, L<Encode> diff --git a/lib/encoding.t b/lib/encoding.t index 8b14c8881a..d61c4f649e 100644 --- a/lib/encoding.t +++ b/lib/encoding.t @@ -1,5 +1,11 @@ print "1..19\n"; +BEGIN { + if (ord("A") == 193) { + print "1..0 # encoding pragma does not support EBCDIC platforms\n"; + } +} + use encoding "latin1"; # ignored (overwritten by the next line) use encoding "greek"; # iso 8859-7 (no "latin" alias, surprise...) |