summaryrefslogtreecommitdiff
path: root/pod/perlebcdic.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-26 09:36:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-26 09:36:22 +0000
commitaa2b82fcd287c16c76ad7206bc32889229a2f2ec (patch)
tree37271494300a954f95ab118c2ae5beb7aab8d720 /pod/perlebcdic.pod
parent01757a36693bb5dadd9e763f70e82c02df281ea1 (diff)
downloadperl-aa2b82fcd287c16c76ad7206bc32889229a2f2ec.tar.gz
Take a cutdown version of the change #20903 also to perlebcdic.
p4raw-link: @20903 on //depot/perl: 756189a56ad5859c77093ea1770647e4355c6aeb p4raw-id: //depot/perl@20905
Diffstat (limited to 'pod/perlebcdic.pod')
-rw-r--r--pod/perlebcdic.pod21
1 files changed, 21 insertions, 0 deletions
diff --git a/pod/perlebcdic.pod b/pod/perlebcdic.pod
index 1e96fdb999..0305b6b323 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<perluniintro>.
+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