chickadee » srfi-135 » textual->utf16le

(textual->utf8 textual [start end]) → bytevectorprocedure
(textual->utf16 textual [start end]) → bytevectorprocedure
(textual->utf16be textual [start end]) → bytevectorprocedure
(textual->utf16le textual [start end]) → bytevectorprocedure

These procedures return a newly allocated (unless empty) bytevector containing a UTF-8 or UTF-16 encoding of the given subtext or substring.

The bytevectors returned by textual->utf8, textual->utf16be, and textual->utf16le do not contain a byte-order mark (BOM). textual->utf16be returns a big-endian encoding, while textual->utf16le returns a little-endian encoding.

The bytevectors returned by textual->utf16 begin with a BOM that declares an implementation-dependent endianness, and the bytevector elements following that BOM encode the given subtext or substring using that endianness.