module QuotedPrintable:sig
..end
This implementation assumes that the encoded string has a text MIME type. The character CR is removed from the input, and LF is replaced by CR/LF. Note that this implies that
val encode : ?pos:int -> ?len:int -> string -> string
Since OcamlNet 0.98, soft line breaks are added to the output to ensure that all output lines have a length <= 76 bytes.
Note unsafe characters:
As recommended by RFC 2045, the characters !#$@[]^`{|}~
and the double quotes
are additionally represented as hex tokens.
Furthermore, the letter 'F' is considered as unsafe if it
occurs at the beginning of the line, so the encoded text
never contains the word "From" at the beginning of a line.
If pos
and/or len
are passed, only the substring starting at
pos
(default: 0) with length len
(default: rest of the string)
is encoded.
val decode : ?pos:int -> ?len:int -> string -> string
Most format errors cause an Invalid_argument
exception.
If pos
and/or len
are passed, only the substring starting at
pos
(default: 0) with length len
(default: rest of the string)
is decoded.
class encoding_pipe :unit ->
Netchannels.pipe
class decoding_pipe :unit ->
Netchannels.pipe