1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2000-2012 Jeffrey Stedfast
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1
8 * of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef __GMIME_CHARSET_H__
23 #define __GMIME_CHARSET_H__
26 #include <sys/types.h>
30 void g_mime_charset_map_init (void);
31 void g_mime_charset_map_shutdown (void);
33 const char *g_mime_locale_charset (void);
34 const char *g_mime_locale_language (void);
36 const char *g_mime_charset_language (const char *charset);
38 const char *g_mime_charset_canon_name (const char *charset);
39 const char *g_mime_charset_iconv_name (const char *charset);
41 #ifndef GMIME_DISABLE_DEPRECATED
42 const char *g_mime_charset_name (const char *charset);
43 const char *g_mime_charset_locale_name (void);
46 const char *g_mime_charset_iso_to_windows (const char *isocharset);
52 * @level: charset level
54 * State used by g_mime_charset_best() and g_mime_charset_best_name().
56 typedef struct _GMimeCharset {
61 void g_mime_charset_init (GMimeCharset *charset);
62 void g_mime_charset_step (GMimeCharset *charset, const char *inbuf, size_t inlen);
63 const char *g_mime_charset_best_name (GMimeCharset *charset);
65 const char *g_mime_charset_best (const char *inbuf, size_t inlen);
67 gboolean g_mime_charset_can_encode (GMimeCharset *mask, const char *charset,
68 const char *text, size_t len);
71 void g_mime_set_user_charsets (const char **charsets);
72 const char **g_mime_user_charsets (void);
77 #endif /* __GMIME_CHARSET_H__ */