Next: Reading Email, Previous: Data Types, Up: guile-email [Index]
guile-email supports encoding and decoding using Base64 encoding, Quoted-Printable encoding and Q-encoding. Note that guile-email automatically invokes the necessary decoding procedures while parsing email. The following procedures are only provided in case you need to use them in a context not automatically handled by guile-email.
Character encoding schemes such as UTF-8 encode characters as bytes. Encoding schemes such as Quoted-Printable encoding, Base64 encoding and Q-encoding re-encode these bytes as 7-bit text suitable for transmission over a medium such as email that is not 8-bit clean. Therefore, the input to the following encoding procedures and the output from the following decoding procedures is a bytevector. Encoding characters to bytes or decoding bytes to characters is not within the scope of these procedures. See (guile)Representing Strings as Bytes for more information on how to do this.
(use-modules (email base64))
Encode bytevector bv using Base64 encoding and return the encoded string.
Decode Base64 encoded string str and return the decoded bytevector.
The Quoted-Printable encoding and decoding procedures in this section are typed functions in that they behave differently based on the types of their arguments.
(use-modules (email quoted-printable))
Encode bytevector bv using Quoted-Printable encoding and return the encoded string.
Read bytes from the bytevector input port in and return the Quoted-Printable encoded string.
Read bytes from the bytevector input port in and write the Quoted-Printable encoded string to output port out.
Decode Quoted-Printable encoded string str and return the decoded bytevector.
Read Quoted-Printable encoded characters from input port in and return the decoded bytevector.
Read Quoted-Printable encoded characters from port in and write the decoded bytevector to bytevector output port out.
Next: Reading Email, Previous: Data Types, Up: guile-email [Index]