All Classes Namespaces Functions Variables Groups Pages
MIME Decoding Functions

## Functions

binary | Mime::mime_decode_base64 (data str)
| returns a binary value from a string in "BASE64" encoding according to RFC 2045 More...
string | Mime::mime_decode_base64_to_string (data str, *string encoding)
| returns a string value from a string in "BASE64" encoding according to RFC 2045 More...
string | Mime::mime_decode_header (string hdr)
| decodes a header string; if any part of the string is encoded with "B" ("BASE64") or "Q" ("quoted-printable") encodings according to RFC 2045 section 6.7, then those parts are decoded and the decoded string is returned More...
string | Mime::mime_decode_quoted_printable (string str, *string encoding)
| returns a string parsed from "quoted-printable" (or "QP") encoding according to RFC 2045 section 6.7 More...
data | Mime::mime_decode_transfer_data (data data, string enc, *string ct)
| decodes data according to the given encoding More...

## Detailed Description

## Function Documentation

binary Mime::mime_decode_base64 | ( | data | str | ) |

returns a binary value from a string in "BASE64" encoding according to RFC 2045

Parameters

  str | the string to decode

Note
  this function is basically just a wrapper for the standard Qore function parse_base64_string()

string Mime::mime_decode_base64_to_string | ( | data | str,
|  | *string | encoding
| ) |  |

returns a string value from a string in "BASE64" encoding according to RFC 2045

Parameters

  str | the string to decode
  encoding | the character encoding to use for the string returned (if not present the default encoding is used)

Note
  this function is basically just a wrapper for the standard Qore function parse_base64_string_to_string()

string Mime::mime_decode_header | ( | string | hdr | ) |

decodes a header string; if any part of the string is encoded with "B" ("BASE64") or "Q" ("quoted-printable") encodings according to RFC 2045 section 6.7, then those parts are decoded and the decoded string is returned

Parameters

  hdr | the header value string to decode

Returns
  the decoded value of the header

string Mime::mime_decode_quoted_printable | ( | string | str,
|  | *string | encoding
| ) |  |

returns a string parsed from "quoted-printable" (or "QP") encoding according to RFC 2045 section 6.7

Parameters

  str | the string to decode
  encoding | the character encoding to use for the string returned (if not present the default encoding is used)

Exceptions

  QUOTED-PRINTABLE-DECODE-ERROR | an error occurred decoding the quoted-printable string

data Mime::mime_decode_transfer_data | ( | data | data,
|  | string | enc,
|  | *string | ct
| ) |  |

decodes data according to the given encoding

Parameters

  data | the data to decode
  enc | the decoding to use; see MIME Content Transfer Encoding Constants for possible values (case is ignored)
  ct | the content-type of the data; if there is a `"charset=xxx"` component and the data is decoded to a string, then it will be returned in the given character encoding

Exceptions

  MIME-TRANSFER-ENCODING-ERROR | unknown transfer encoding