Module Headers.Encoded_word

module Charset : sig ... end
val decode : ?charsets:Charset.t list -> string -> string Core.Or_error.t

Like decode_with_charset, but completely ignores all charset information and simply concats all of the bytes together.

val decode_with_charset : ?charsets:Charset.t list -> string -> [ `Plain of string | `Encoded of Charset.t * string ] list Core.Or_error.t

Decodes words encoded as per: https://tools.ietf.org/html/rfc2047

val decode_with_raw_charset : string -> [ `Plain of string | `Encoded of [ `Charset of string ] * string ] list Core.Or_error.t

Like decode_with_charset, but supports arbitrary charsets, not just the ones in Charset.t.