Common Lisp Package: CL-RFC2047

README:

FUNCTION

Public

DECODE (STR &KEY (START 0) (END (LENGTH STR)))

Decodes an encoded string and returns the result. Start and end can be defined if only a part of the sring shell be decoded.

DECODE* (STR &KEY (START 0) (END (LENGTH STR)))

Decodes a mixed string, i.e., a string that may contain encoded and unencoded words.

ENCODE (STR &OPTIONAL &KEY (ENCODING B) (CHARSET UTF-8))

encodes the string using the given encoding and character set

Private

CHAR-MAX-LEN (CHARSET)

returns the maximum number of bytes a character uses in the given charset and as second value a boolean denoting whether the length is fixed. Throws an error if the charset is unknown.

DECODE-ONE-WORD (STR)

Decodes a single encoded word. Encodings can consist of multiple words, seperated by <CRLFSP>

DECODE-Q-TO-OCTETS (STR)

decodes q encoded strings to octet arrays

DIRECT-Q-P (C)

Whether a character can be used directly in Q encoding.

MAP-TO-EXTERNAL-FORMAT (NAME)

Maps a character encoding name to the internal symbol. Throws an error if the character encoding is not known.

CONSTANT

Private

+CRLFSP+

The character sequence <CRLFSP> which seperates the lines of multi line fields.

+DECODED-LINE-REGEXP+

The regular expression that matches a single encoded word.