Module MrMime_quotedPrintable.Decoder

module Decoder: sig .. end

val is_hex : char -> bool
is_hex chr returns true iff the character is a hexadecimal character. The standard defines an hexadecimal character like that:

      HEX   = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
      DIGIT = "0" - "9"
      

MrMime accepts "a" - "f" characters too.

val hex : char Parser.t
Corresponding to the rule from RFC2045 about the hexadecimal value:

      hex-octet := "=" 2(DIGIT / "A" / "B" / "C" / "D" / "E" / "F")
                   ; Octet must be used for characters > 127, =,
                   ; SPACEs or TABs at the ends of lines, and is
                   ; recommended for any character not listed in
                   ; RFC2049 as "mail-safe".
      

As we see above, MrMime accepts "a" - "f" characters too. This decoder returns the hexadecimal value as char.

val decode : unit Parser.t -> unit Parser.t -> string Parser.t
decode boundary rollback decodes a QuotedPrintable input and stops at the boundary and, iff he decoder recognizes the boundary, it rollbacks - that means the input contains the boundary although it recognized.
val inline : unit -> string Parser.t
inline () decodes an inline encoded string. It stops when it recognizes the "?" character and it does not consume him.