/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2009 Hiroyuki Yamamoto and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
*/
#ifndef __CODECONV_H__
C_EUC_KR,
C_ISO_2022_CN,
C_EUC_CN,
+ C_GB18030,
C_GB2312,
C_GBK,
C_EUC_TW,
C_TCVN5712_1
} CharSet;
-typedef void (*CodeConvFunc) (gchar *outbuf, gint outlen, const gchar *inbuf);
+typedef gint (*CodeConvFunc) (gchar *outbuf, gint outlen, const gchar *inbuf);
struct _CodeConverter
{
#define CS_EUC_KR "EUC-KR"
#define CS_ISO_2022_CN "ISO-2022-CN"
#define CS_EUC_CN "EUC-CN"
+#define CS_GB18030 "GB18030"
#define CS_GB2312 "GB2312"
#define CS_GBK "GBK"
#define CS_X_GBK "X-GBK"
const gchar *src_code,
const gchar *dest_code);
-gchar *conv_iconv_strdup (const gchar *inbuf,
- const gchar *src_code,
- const gchar *dest_code);
-
const gchar *conv_get_charset_str (CharSet charset);
CharSet conv_get_charset_from_str (const gchar *charset);
const gchar *conv_get_locale_charset_str (void);
const gchar *conv_get_current_locale (void);
gchar *conv_unmime_header (const gchar *str,
- const gchar *default_encoding);
+ const gchar *default_encoding,
+ gboolean addr_field);
void conv_encode_header (gchar *dest,
gint len,
const gchar *src,