Changes between Version 9 and Version 10 of PortsCowan


Ignore:
Timestamp:
09/06/10 12:27:35 (7 years ago)
Author:
cowan
Comment:

Clarifications and cleanups

Legend:

Unmodified
Added
Removed
Modified
  • PortsCowan

    v9 v10  
    3434 `encoding`:: 
    3535 
    36  Specifies what character encoding to use on a binary port.  The value `US-ASCII` MUST be supported.  The values `ISO-8859-1` and `UTF-8` SHOULD be supported if the implementation contains the appropriate repertoire of characters.  Other values MAY be supported, which SHOULD appear in the [http://www.iana.org/assignments/character-sets IANA list of encodings].  The default value is implementation-dependent. 
     36 Specifies what character encoding to use on a binary port.  The (case insensitive) value `US-ASCII` MUST be supported.  The values `ISO-8859-1` and `UTF-8` SHOULD be supported if the implementation contains the appropriate repertoire of characters.  Other values MAY be supported, which SHOULD appear in the [http://www.iana.org/assignments/character-sets IANA list of encodings].  The default value is implementation-dependent. 
    3737 
    3838 If a BOM (Byte Order Mark, U+FEFF) is present at the beginning of input on a port encoded as UTF-8, it is skipped.  A BOM is not automatically written on output.  Implementations MAY provide a way around this. 
     
    113113`(read-line `[ ''character-input-port'' ]`)` 
    114114 
    115 Same as R6RS.  Reads a line from ''port'' (or the current input port) terminated by a `#\newline` character (which may be the result of newline conversion in the port). This is a convenience function. 
     115Same as R6RS.  Reads a line from ''port'' (or the current input port) terminated by a `#\newline` character (which may be the result of newline conversion in the port).   The `#\newline` is not part of the returned string.  This is a convenience function. 
    116116 
    117117`(open-input-string `''string''`)` 
     
    127127String ports are character ports, but not binary ports, so these procedures do not apply to them.  Implementations MAY support other kinds of binary ports such as process ports or stream socket ports. 
    128128 
    129 Mixing binary I/O with character I/O on the same port produces undefined behavior if character buffering is provided on that port. 
     129Mixing binary I/O with character I/O on the same port is safe if there is no character buffering on that port, but produces undefined behavior otherwise. 
    130130 
    131131`(binary-port? `''obj''`)` 
     
    182182These procedures are not in the core because many systems, especially embedded ones, don't require the ability to read or write general Scheme objects, and very small implementations may not want the overhead of a Scheme parser.  Writing may be useful even when reading is not, which is why there are two modules. 
    183183 
    184 Note that implementations may provide ports that are not character ports, such as directory ports or vector ports, and extend these procedure to work on them. 
     184Note that implementations may provide ports that are not character ports, such as directory ports or vector ports, and extend these procedures to work on them. 
    185185 
    186186=== Read Module ===