This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki StringBytevectorConversionCowan version 1

author

cowan

comment


    

ipnr

69.195.55.172

name

StringBytevectorConversionCowan

readonly

0

text

= TBD =


Stuff reclaimed from old BlobAPI

== String procedures ==

`(bytevector-<encoding>-ref` ''bytevector'' [ [ ''start'' ] ''end'' ] `)`

Returns a newly allocated Scheme string corresponding to the binary value encoded according to ''encoding'' beginning at offset ''n'' in ''bytevector'' and continuing for ''l'' bytes.

`(bytevector-<encoding>-set!` ''bytevector n v''`)`

Converts ''v'' to a binary string encoded according to ''encoding'' and places it into ''bytevector'' beginning at offset ''n''.  Returns the number of bytes encoded.

== String encodings ==

 `utf8`::
  UTF-8 encoding
 `utf16`::
  UTF-16 encoding (respects BOM if present, defaults to native encoding otherwise)
 `utf16be`::
  UTF-16BE encoding (treats BOM as a normal character)
 `utf16le`::
  UTF-16LE encoding (treats BOM as a normal character)

time

2012-11-22 22:52:03

version

1