]> diplodocus.org Git - nmh/blob - sbr/encode_rfc2047.h
sendsbr.c: Move interface to own file.
[nmh] / sbr / encode_rfc2047.h
1 /* encode_rfc2047.h -- encode message headers using RFC 2047 encoding.
2 *
3 * This code is Copyright (c) 2017, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information. */
6
7 /*
8 * Encode a message header using RFC 2047 encoding. If the message contains
9 * no non-ASCII characters, then leave the header as-is.
10 *
11 * Arguments include:
12 *
13 * name - Message header name
14 * value - Message header content; must point to allocated memory
15 * (may be changed if encoding is necessary)
16 * encoding - Encoding type. May be one of CE_UNKNOWN (function chooses
17 * the encoding), CE_BASE64 or CE_QUOTED
18 * charset - Charset used for encoding. If NULL, obtain from system
19 * locale.
20 *
21 * Returns 0 on success, any other value on failure.
22 */
23
24 int encode_rfc2047(const char *, char **, int, const char *);