X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlebcdic.pod;h=0305b6b323236f5d07d89e050f3ef3bd6fa3c72a;hb=e77edca30a2be27033e243f6b69dee5191c27b5a;hp=44ad6b9f0d77349d0aa859b2a8a4f82b5d93d19b;hpb=1b2d223bc80114ab97e5af7bf5270927ae350ba4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlebcdic.pod b/pod/perlebcdic.pod index 44ad6b9..0305b6b 100644 --- a/pod/perlebcdic.pod +++ b/pod/perlebcdic.pod @@ -168,6 +168,27 @@ and from Latin-1 code points to EBCDIC code points For doing I/O it is suggested that you use the autotranslating features of PerlIO, see L. +Since version 5.8 Perl uses the new PerlIO I/O library. This enables +you to use different encodings per IO channel. For example you may use + + use Encode; + open($f, ">:encoding(ascii)", "test.ascii"); + print $f "Hello World!\n"; + open($f, ">:encoding(cp37)", "test.ebcdic"); + print $f "Hello World!\n"; + open($f, ">:encoding(latin1)", "test.latin1"); + print $f "Hello World!\n"; + open($f, ">:encoding(utf8)", "test.utf8"); + print $f "Hello World!\n"; + +to get two files containing "Hello World!\n" in ASCII, CP 37 EBCDIC, +ISO 8859-1 (Latin-1) (in this example identical to ASCII) respective +UTF-EBCDIC (in this example identical to normal EBCDIC). See the +documentation of Encode::PerlIO for details. + +As the PerlIO layer uses raw IO (bytes) internally, all this totally +ignores things like the type of your filesystem (ASCII or EBCDIC). + =head1 SINGLE OCTET TABLES The following tables list the ASCII and Latin 1 ordered sets including @@ -1248,12 +1269,16 @@ Legacy multi byte EBCDIC code pages XXX. There may be a few system dependent issues of concern to EBCDIC Perl programmers. -=head2 OS/400 - -The PASE environment. +=head2 OS/400 =over 8 +=item PASE + +The PASE environment is runtime environment for OS/400 that can run +executables built for PowerPC AIX in OS/400, see L. PASE +is ASCII-based, not EBCDIC-based as the ILE. + =item IFS access XXX.