2
* $Id: charset.h 341 2006-12-21 23:44:18Z 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 {
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 */
39
#define CV_LOSES_SOME_LETTERS 4 /* Some special chars and */
40
/* some letters may be lost */
46
/* exported protoypes */
48
char *body_charset(MAILSTREAM *, long, unsigned char *);
49
unsigned char *trans_euc_to_2022_jp(unsigned char *);
50
unsigned char *rfc1522_decode(unsigned char *, size_t, char *, char **);
51
char *rfc1522_encode(char *, size_t, unsigned char *, char *);
52
CONV_TABLE *conversion_table(char *, char *);
53
void decode_addr_names_to_utf8(ADDRESS *);
54
void convert_possibly_encoded_str_to_utf8(char **);
57
#endif /* PITH_CHARSET_INCLUDED */