Author: ruoso
Date: 2009-02-16 12:44:44 +0100 (Mon, 16 Feb 2009)
New Revision: 25357

Modified:
   docs/Perl6/Spec/S16-io.pod
Log:
[spec/S16] read and write are always "raw". You should use "print" or "getc" if 
you want encodings applied

Modified: docs/Perl6/Spec/S16-io.pod
===================================================================
--- docs/Perl6/Spec/S16-io.pod  2009-02-16 11:13:03 UTC (rev 25356)
+++ docs/Perl6/Spec/S16-io.pod  2009-02-16 11:44:44 UTC (rev 25357)
@@ -63,6 +63,11 @@
 of 0 means end of file. It might return unthrown failures, to be
 specified by each IO implementation.
 
+It is important to realize that this is "raw" read. You're going to
+have plain octets stored in $buf, if this is actually encoded data,
+you're going to need to encode it later, or use a "getc" or other
+IO::Readable::Encoded methods.
+
 =back
 
 =head2 IO::Writeable
@@ -77,6 +82,11 @@
 written is returned. It might return unthrown failures, to be
 specified by each IO implementation.
 
+It is important to realize that this is "raw" write. $buf should
+contain plain octets that are going to be sent. If $buf contains
+encoded data, you should decode it first, or use "print" or other
+IO::Writeable::Encoded methods.
+
 =back
 
 =head2 IO::FileDescriptor
@@ -206,15 +216,12 @@
 $.input_record_separator it skips it and reads the next field. If
 $.input_escape is set, it should pay attention to that.
 
-=item method Str getc
+=item method Str getc(Int $length? = 1)
 
-Reads the next character in the set $.encoding according to the
-$.locale.
+Reads the next $length character in the set $.encoding according to
+the $.locale, or the undefined value at end of file, or if there was
+an error (in the latter case C<$!> is set).
 
-Returns the next character from the input stream attached to IO,
-or the undefined value at end of file, or if there was an error (in
-the latter case C<$!> is set).
-
 =item IO.lines
 
     our List multi method lines (IO $handle:) is export;

Reply via email to