[R6RS] proposed conversions between strings and bytevectors

Michael Sperber sperber at informatik.uni-tuebingen.de
Fri May 11 10:48:48 EDT 2007


William D Clinger <will at ccs.neu.edu> writes:

> 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
> mark).

What would be your preferred semantics if the BOM is missing?

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



More information about the R6RS mailing list