[R6RS] proposed conversions between strings and bytevectors

William D Clinger will at ccs.neu.edu
Fri May 11 10:43:53 EDT 2007

Mike wrote:
> > (utf16->string bytevector)                             procedure
> > (utf16->string bytevector endianness)                  procedure
> >
> > If no endianness is specified, the bytevector must contain the
> > representation of a string according to the UTF-16 encoding
> > scheme (which permits but does not require a byte order mark).
> I don't understand this sentence.  It sounds as though the procedure
> might pay attention to the BOM.  However, the reference implementation
> seems to assume UTF-16BE, which would be consistent with
> `string->utf16'.  I'm going with UTF-16BE.  If anybody objects, yell.

I will object if the R6RS pulls its usual stunt
of using mustard to forbid implementations to
extend these procedures to make them more useful.
In this case, the more useful semantics is for
these procedures to accept arguments in UTF-16
(which permits but does not require a byte order


More information about the R6RS mailing list