This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] Encode.pm docs fix
authorGisle Aas <gisle@aas.no>
Mon, 10 Sep 2001 11:27:02 +0000 (04:27 -0700)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 11 Sep 2001 03:12:44 +0000 (03:12 +0000)
Message-ID: <lrwv363nrd.fsf@caliper.ActiveState.com>

p4raw-id: //depot/perl@11994

ext/Encode/Encode.pm

index 6a297a3..2aee7c1 100644 (file)
@@ -667,13 +667,13 @@ can be considered as being in this form without encoding. An encoding
 to transfer strings in this form (e.g. to write them to a file) would
 need to
 
-     pack('L',map(ord($_),split(//,$string)));   # native
+     pack('L*', unpack('U*', $string));  # native
   or
-     pack('V',map(ord($_),split(//,$string)));   # little-endian
+     pack('V*', unpack('U*', $string));  # little-endian
   or
-     pack('N',map(ord($_),split(//,$string)));   # big-endian
+     pack('N*', unpack('U*', $string));  # big-endian
 
-depending on the endian required.
+depending on the endianness required.
 
 No UTF-32 encodings are implemented yet.