I regret I only started looking at this document today, but curious what the disposition on line-ending styles really is supposed to be.
From the SRFI document:
"An end-of-line style is a symbol that describes how a textual port transcodes representations of line endings. The symbols lf and none mean that no newline conversion is done. The symbol crlf means that after decoding with a codec, the sequence CRLF, that is, a #\return followed by a #\newline, is replaced by #\newline. Correspondingly, the reverse is done before encoding. Implementations may support additional symbols."
This description is inconsistent with the description in r6rs-lib/8.2.4, and with the behavior of chez, racket and guile. I was not able to easily id not test any other implementations.
From r6rs-lib:
"For a textual input port, any eol-style symbol other than
none means that all of the above line-ending encodings are recognized and are translated into a single linefeed."
Guile performs no input transformation no matter what the provided eol style is, so it's not a good example. Chez & Racket seem to be consistent with the r6rs spec -- ie. they transform all of the line-ending styles when the given style is not none.
Sample code used:
#!r6rs
(import (rnrs))
(define B (string->utf8 "lf\ncrlf\r\ncr\rlfcr\n\r"))
(for-each
(lambda (es)
(write es)
(write-char #\tab)
(write (bytevector->string B (make-transcoder (utf-8-codec) es)))
(newline))
(list
(eol-style none)
(eol-style lf)
(eol-style cr)
(eol-style crlf)
(eol-style nel)))
;; Expected output per R6RS standard:
;;
;; none "lf\ncrlf\r\ncr\rlfcr\n\r"
;; lf "lf\ncrlf\ncr\nlfcr\n\n"
;; cr "lf\ncrlf\ncr\nlfcr\n\n"
;; crlf "lf\ncrlf\ncr\nlfcr\n\n"
;; nel "lf\ncrlf\ncr\nlfcr\n\n"
;;