package mrmime
Module Mrmime.Encoded_wordSource
Source
type charset = [ | `UTF_8| `UTF_16| `UTF_16BE| `UTF_16LE| Rosetta.encoding| `US_ASCII| `Charset of string
]make ~encoding x returns an encoded word according encoding (Quoted Printable encoding or Base64 encoding). x must be a valid UTF-8 string. charset of encoded word will be, by the way, "UTF-8".
NOTE: If you expect to generate an encoded word with something else than UTF-8 (like latin1), we decided to not handle this case and just produce valid UTF-8 contents in any cases.
Alias of make but raises an Invalid_argument if it fails.
Accessors.
Pretty-printer.
Equal.
charset_of_string s returns charset of well-formed charset identifier s (according IANA).
normalize_to_utf8 ~charset s maps a source s which is encoded with the charset charset and try to map/normalize it to UTF-8.
of_string v tries to parse v as an encoded-word (according RFC 2047).