/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2003 Hiroyuki Yamamoto
*
* 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
#include <glib.h>
-#if HAVE_LIBJCONV
-# include <jconv.h>
-#endif
-
typedef struct _CodeConverter CodeConverter;
typedef enum
C_ISO_8859_7,
C_ISO_8859_8,
C_ISO_8859_9,
+ C_ISO_8859_11,
C_ISO_8859_13,
C_ISO_8859_15,
C_BALTIC,
C_EUC_CN,
C_GB2312,
C_EUC_TW,
- C_BIG5
+ C_BIG5,
+ C_TIS_620,
+ C_WINDOWS_874
} CharSet;
typedef void (*CodeConvFunc) (gchar *outbuf, gint outlen, const gchar *inbuf);
struct _CodeConverter
{
-#if !HAVE_LIBJCONV
CodeConvFunc code_conv_func;
-#endif
gchar *charset_str;
CharSet charset;
};
#define CS_ISO_8859_7 "ISO-8859-7"
#define CS_ISO_8859_8 "ISO-8859-8"
#define CS_ISO_8859_9 "ISO-8859-9"
+#define CS_ISO_8859_11 "ISO-8859-11"
#define CS_ISO_8859_13 "ISO-8859-13"
#define CS_ISO_8859_15 "ISO-8859-15"
#define CS_BALTIC "BALTIC"
#define CS_EUC_JP "EUC-JP"
#define CS_EUCJP "EUCJP"
#define CS_SHIFT_JIS "Shift_JIS"
+#define CS_SHIFT__JIS "SHIFT-JIS"
+#define CS_SJIS "SJIS"
+#define CS_X_SJIS "X-SJIS"
#define CS_ISO_2022_KR "ISO-2022-KR"
#define CS_EUC_KR "EUC-KR"
#define CS_ISO_2022_CN "ISO-2022-CN"
#define CS_GB2312 "GB2312"
#define CS_EUC_TW "EUC-TW"
#define CS_BIG5 "Big5"
+#define CS_TIS_620 "TIS-620"
+#define CS_WINDOWS_874 "Windows-874"
void conv_jistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_euctojis(gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_unreadable_latin(gchar *str);
void conv_mb_alnum(gchar *str);
+CharSet conv_guess_encoding(const gchar *str);
+
void conv_jistodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_sjistodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_euctodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
gint outlen,
const gchar *inbuf);
-gchar *conv_codeset_strdup(const gchar *inbuf,
- const gchar *src_codeset,
- const gchar *dest_codeset);
+gchar *conv_codeset_strdup (const gchar *inbuf,
+ const gchar *src_code,
+ const gchar *dest_code);
+
+CodeConvFunc conv_get_code_conv_func (const gchar *src_charset_str,
+ const gchar *dest_charset_str);
-CodeConvFunc conv_get_code_conv_func(const gchar *charset);
+#if HAVE_ICONV
+gchar *conv_iconv_strdup (const gchar *inbuf,
+ const gchar *src_code,
+ const gchar *dest_code);
+#endif
const gchar *conv_get_charset_str (CharSet charset);
CharSet conv_get_charset_from_str (const gchar *charset);