[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] current-XXX-port is binary?
- To: scheme-reports@x
- Subject: [Scheme-reports] current-XXX-port is binary?
- From: Per Bothner <per@x>
- Date: Wed, 03 Aug 2011 12:03:52 -0700
This seems wrong - these default ports need to be character ports.
For normal "simple" use-cases people are reading and writing text, not
The nullary read, read-char, peek-char, and read-line default to
current-input-port - which thus should be character ports.
Likewise for write, display, etc.
current-input-port and current-output-port are seldom bound to binary
files: In a Unix-like-pipeline or re-direction, the data are almost
always text. If standard input is UTF-8, you may need to read multiple
bytes for each read-char.
Note also that in R6RS these are textual ports.
Scheme-reports mailing list