* Create help for explaining how encrypted password file support
[alpine.git] / pith / charset.h
blobf89c6e4c2322d4bfabc487d358d96fee4459e905
1 /*
2 * $Id: charset.h 765 2007-10-23 23:51:37Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006 University of Washington
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * ========================================================================
16 #ifndef PITH_CHARSET_INCLUDED
17 #define PITH_CHARSET_INCLUDED
20 #include "../pith/filttype.h"
23 typedef struct conversion_table {
24 char *from_charset;
25 char *to_charset;
26 int quality;
27 void *table;
28 filter_t convert;
29 } CONV_TABLE;
32 /* Conversion table quality of tranlation */
33 #define CV_NO_TRANSLATE_POSSIBLE 1 /* We don't know how to */
34 /* translate this pair */
35 #define CV_NO_TRANSLATE_NEEDED 2 /* Not necessary, no-op */
36 #define CV_LOSES_SPECIAL_CHARS 3 /* Letters will translate */
37 /* ok but some special chars */
38 /* may be lost */
39 #define CV_LOSES_SOME_LETTERS 4 /* Some special chars and */
40 /* some letters may be lost */
43 #define CSET_MAX 64
46 /* exported protoypes */
47 char *body_charset(MAILSTREAM *, long, unsigned char *);
48 unsigned char *trans_euc_to_2022_jp(unsigned char *);
49 unsigned char *rfc1522_decode_to_utf8(unsigned char *, size_t, char *);
50 char *rfc1522_encode(char *, size_t, unsigned char *, char *);
51 CONV_TABLE *conversion_table(char *, char *);
52 void decode_addr_names_to_utf8(ADDRESS *);
53 void convert_possibly_encoded_str_to_utf8(char **);
56 #endif /* PITH_CHARSET_INCLUDED */