X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Futf8.pm;h=6d6c0eb503e5d5f3dbe13f4f0eea1d7503563eb8;hb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;hp=17ec37bbe21521067a12774b9ae448b820e53519;hpb=4b19af017623bfa3bb72bb164598a517f586e0d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/utf8.pm b/lib/utf8.pm index 17ec37b..6d6c0eb 100644 --- a/lib/utf8.pm +++ b/lib/utf8.pm @@ -1,5 +1,7 @@ package utf8; +if (ord('A') != 193) { # make things more pragmatic for EBCDIC folk + $utf8::hint_bits = 0x00800000; sub import { @@ -13,7 +15,10 @@ sub unimport { sub AUTOLOAD { require "utf8_heavy.pl"; - goto &$AUTOLOAD; + goto &$AUTOLOAD if defined &$AUTOLOAD; + Carp::croak("Undefined subroutine $AUTOLOAD called"); +} + } 1; @@ -44,7 +49,9 @@ in future we would like to standardize on the UTF-8 encoding for source text. Until UTF-8 becomes the default format for source text, this pragma should be used to recognize UTF-8 in the source. When UTF-8 becomes the standard source format, this pragma will -effectively become a no-op. +effectively become a no-op. This pragma already is a no-op on +EBCDIC platforms (where it is alright to code perl in EBCDIC +rather than UTF-8). Enabling the C pragma has the following effects: