manpagez: man pages & more
info bigloo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

20.1 RFC 2045 – MIME, Part one

This section described the functions offered by Bigloo to encode and decode some of the formats specified in the RFC 2045 http://tools.ietf.org/html/rfc2045.

Bigloo Mail procedure: quoted-printable-encode string
Bigloo Mail procedure: quoted-printable-decode string

These functions encode/decode a string into and from the quoted-printable format.

Examples:

(quoted-printable-encode "foo bar") ⇒ "foobar=20"
(quoted-printable-decode "foobar=20") ⇒ "foo bar"
Bigloo Mail procedure: quoted-printable-encode-port ip op
Bigloo Mail procedure: quoted-printable-decode-port ip op [rfc2047]

These functions are similar to quoted-printable-encode and quoted-printable-decode except that they operate on input-ports and output-ports.

The function quoted-printable-decode-port accepts an optional argument: rfc2047. If this argument is #t, then the parsing stops on the prefix ?=, which is a marker in the mail subject as specified by the RFC 2047, (see http://tools.ietf.org/html/rfc2047) is found.

Bigloo Mail procedure: mime-content-decode string
Bigloo Mail procedure: mime-content-decode-port input-port

These two functions parse respectively a string and an input-port and return a list of three elements:

  • a content type,
  • a content subtype,
  • options.

Example:

(mime-content-type-decode "text/plain; boundary=Apple-Mail-11") 
  ⇒ (text plain ((boundary . Apple-Mail-11)))
Bigloo Mail procedure: mime-content-disposition-decode string
Bigloo Mail procedure: mime-content-disposition-decode-port input-port

These two functions parse respectively a string and an input-port and return a list describing the content disposition.

Example:

(mime-content-disposition-decode "attachment; filename=\"smine.p7s\"")
  ⇒ (attachment ((filename . smine.p7s)))
Bigloo Mail procedure: mime-multipart-decode string boundary [recursive]
Bigloo Mail procedure: mime-multipart-decode-port input-port boundary [recursive]

These two functions parse respectively a string and an input-port and return a list of mime sections.

If the optional argument recursive controls whether subparts of a multipart section must be decoded are not. If the recursive is #t then all subparts of the multipart content are decoded. The result is a fully decoded multipart section. If recursive is #f subparts are not decoded and included in the result as plain strings.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on March 31, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.