The cl-rfc2047 Reference Manual

This is the cl-rfc2047 Reference Manual, version 0.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 04:25:38 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-rfc2047

Implemntation of RFC2047.

Maintainer

Max Rottenkolber <>

Author

Christian Haselbach

License

MIT

Version

0.4

Dependencies
  • cl-base64 (system).
  • babel (system).
Source

cl-rfc2047.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-rfc2047/cl-rfc2047.asd

Source

cl-rfc2047.asd.

Parent Component

cl-rfc2047 (system).

ASDF Systems

cl-rfc2047.

Packages

cl-rfc2047-asd.


3.1.2 cl-rfc2047/package.lisp

Source

cl-rfc2047.asd.

Parent Component

cl-rfc2047 (system).

Packages

cl-rfc2047.


3.1.3 cl-rfc2047/constants.lisp

Dependency

package.lisp (file).

Source

cl-rfc2047.asd.

Parent Component

cl-rfc2047 (system).

Internals

3.1.4 cl-rfc2047/encode.lisp

Dependencies
Source

cl-rfc2047.asd.

Parent Component

cl-rfc2047 (system).

Public Interface
Internals

3.1.5 cl-rfc2047/decode.lisp

Dependencies
Source

cl-rfc2047.asd.

Parent Component

cl-rfc2047 (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-rfc2047-asd

Source

cl-rfc2047.asd.

Use List
  • asdf/interface.
  • common-lisp.

4.2 cl-rfc2047

Implementation of the Email header encoding defined in [RFC 2047](http://tools.ietf.org/html/rfc2047).

Source

package.lisp.

Use List
  • babel.
  • cl-base64.
  • common-lisp.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: decode (string &key start end)

*Arguments and Values:*

_string_—a _string_.

_start_, _end_—_bounding index designators_ of _string_. The default for _start_ is 0 and the default for _end_ is {nil}.

*Description*:

{decode} returns the decoded word in _string_.

*Exceptional Situations:*

If {decode} fails an _error condition_ is signaled.

Package

cl-rfc2047.

Source

decode.lisp.

Function: decode* (string &key start end errorp)

*Arguments and Values:*

_string_—a _string_.

_start_, _end_—_bounding index designators_ of _string_. The default for _start_ is 0 and the default for _end_ is {nil}.

_error-p_—a _generalized boolean_. The default is _true_.

*Description*:

{decode*} returns a decoded copy of _string_ containing encoded as well as unencoded words.

*Exceptional Situations:*

If {decode*} fails and _error-p_ is _true_ an _error condition_ is signaled.

Package

cl-rfc2047.

Source

decode.lisp.

Function: encode (string &key encoding charset)

*Arguments and Values:*

_string_—a _string_.

_encoding_—a _keyword_. Can either be {:b} or {:q}. The default is {:b}.

_charset_—a _keyword_ denoting the character encoding used. The default is {:utf-8}.

*Description*:

{encode} returns an encoded copy of _string_. Words will be encoded using _encoding_ and _charset_. If _encoding_ is {:b} then the "B" encoding is used. If _encoding_ is {:q} then the "Q" encoding is used.

Package

cl-rfc2047.

Source

encode.lisp.

Function: should-encode-p (string)

*Arguments and Values:*

_string_—a _string_.

*Description*:

{should-encode-p} returns _true_ if _string_ contains characters that need to be encoded, otherwise, returns _false_.

Package

cl-rfc2047.

Source

encode.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *ascii-boundary*

ASCII boundary.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *ascii-equals*

ASCII equals sign character code.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *ascii-newline*

ASCII newline character code.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *ascii-question-mark*

ASCII question mark character code.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *ascii-return*

ASCII return character code.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *ascii-space*

ASCII space character code.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *ascii-underscore*

ASCII underscore character code.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *crlfsp*

<CRLFSP>

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *encoded-word-length*

Maximum length of an encoded word.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *encoded-word-length-overhead*

Number of syntax overhead characters for encoded words.

Package

cl-rfc2047.

Source

constants.lisp.

Special Variable: *underscore-value*

RFC2047 mandaed value for underscore character in q encoded strings.

Package

cl-rfc2047.

Source

constants.lisp.


5.2.2 Ordinary functions

Function: b-encode (string charset)

Return list of base64 encoded words for STRING using CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: b-split (string charset)

Return STRING split up in parts for b-encoding according to CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: character-ascii (character)

Return ASCII code for CHARACTER or NIL.

Package

cl-rfc2047.

Source

encode.lisp.

Function: decode-bytes (encoded-bytes charset)

Decode ENCODED-BYTES according to CHARSET.

Package

cl-rfc2047.

Source

decode.lisp.

Function: decode-word (encoded-word)

Decode ENCODED-WORD.

Package

cl-rfc2047.

Source

decode.lisp.

Function: decode-word* (string)

Decode mixed STRING.

Package

cl-rfc2047.

Source

decode.lisp.

Function: encoded-word (encoding charset string)

Return encoded word for ENCODING, CHARSET and STRING.

Package

cl-rfc2047.

Source

encode.lisp.

Function: encoded-word-content-bytes (charset)

Return number of maximum bytes per b-encoded word using CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: encoded-word-content-length (charset)

Return maximum length of encoded word contents for CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: encoded-word-to (string from)

Find end of encoded word in STRING starting at FROM.

Package

cl-rfc2047.

Source

decode.lisp.

Function: encoded-words (encoding charset strings)

Return encoded words for ENCODING, CHARSET and STRINGS.

Package

cl-rfc2047.

Source

encode.lisp.

Function: intern* (string)

Intern STRING upcased in KEYWORD package.

Package

cl-rfc2047.

Source

decode.lisp.

Function: limited-words (pieces length word-type)

Return list of words no longer than LENGTH concatenated from PIECES destructively.

Package

cl-rfc2047.

Source

encode.lisp.

Function: lwsp-character-p (character)

Predicate to test if CHARACTER is a LWSP-char.

Package

cl-rfc2047.

Source

decode.lisp.

Function: parse-encoded-word (encoded-word)

Parse encoding, charset and encoded string of ENCODED-WORD.

Package

cl-rfc2047.

Source

decode.lisp.

Function: q-decode (encoded-string charset)

Decode ENCODED-STRING according to CHARSET.

Package

cl-rfc2047.

Source

decode.lisp.

Function: q-encode (string charset)

Return list of q encoded words for STRING using CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: q-encode-characters (string charset)

Return list of q encoded characters for STRING using CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: q-encode-p (character)

Predicate to test if CHARACTER needs to be q-encoded.

Package

cl-rfc2047.

Source

encode.lisp.

Function: q-encode-string (string charset)

Return q encoded STRING using CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: string-to-grouped-bytes (string charset)

Return list of byte vectors for STRING using CHARSET.

Package

cl-rfc2047.

Source

encode.lisp.

Function: unfold-crlfsp (string)

Replace any <CRLF SPACE> in STRING with <SPACE>.

Package

cl-rfc2047.

Source

decode.lisp.

Function: write-decoded-underscore-value (charset stream)

Write decoded *UNDERSCORE-VALUE* to STREAM according to CHARSET.

Package

cl-rfc2047.

Source

decode.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   B   C   D   E   F   I   L   P   Q   S   U   W  
Index Entry  Section

B
b-encode: Private ordinary functions
b-split: Private ordinary functions

C
character-ascii: Private ordinary functions

D
decode: Public ordinary functions
decode*: Public ordinary functions
decode-bytes: Private ordinary functions
decode-word: Private ordinary functions
decode-word*: Private ordinary functions

E
encode: Public ordinary functions
encoded-word: Private ordinary functions
encoded-word-content-bytes: Private ordinary functions
encoded-word-content-length: Private ordinary functions
encoded-word-to: Private ordinary functions
encoded-words: Private ordinary functions

F
Function, b-encode: Private ordinary functions
Function, b-split: Private ordinary functions
Function, character-ascii: Private ordinary functions
Function, decode: Public ordinary functions
Function, decode*: Public ordinary functions
Function, decode-bytes: Private ordinary functions
Function, decode-word: Private ordinary functions
Function, decode-word*: Private ordinary functions
Function, encode: Public ordinary functions
Function, encoded-word: Private ordinary functions
Function, encoded-word-content-bytes: Private ordinary functions
Function, encoded-word-content-length: Private ordinary functions
Function, encoded-word-to: Private ordinary functions
Function, encoded-words: Private ordinary functions
Function, intern*: Private ordinary functions
Function, limited-words: Private ordinary functions
Function, lwsp-character-p: Private ordinary functions
Function, parse-encoded-word: Private ordinary functions
Function, q-decode: Private ordinary functions
Function, q-encode: Private ordinary functions
Function, q-encode-characters: Private ordinary functions
Function, q-encode-p: Private ordinary functions
Function, q-encode-string: Private ordinary functions
Function, should-encode-p: Public ordinary functions
Function, string-to-grouped-bytes: Private ordinary functions
Function, unfold-crlfsp: Private ordinary functions
Function, write-decoded-underscore-value: Private ordinary functions

I
intern*: Private ordinary functions

L
limited-words: Private ordinary functions
lwsp-character-p: Private ordinary functions

P
parse-encoded-word: Private ordinary functions

Q
q-decode: Private ordinary functions
q-encode: Private ordinary functions
q-encode-characters: Private ordinary functions
q-encode-p: Private ordinary functions
q-encode-string: Private ordinary functions

S
should-encode-p: Public ordinary functions
string-to-grouped-bytes: Private ordinary functions

U
unfold-crlfsp: Private ordinary functions

W
write-decoded-underscore-value: Private ordinary functions