aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-19 06:13:23 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-19 06:13:23 +0000
commit1ca5b9aa126b860d9198f85e44104f857513bef5 (patch)
tree17e7a90c7a707c00308be37870f5cffeec1647ed
parent8c429a3abcd7b81b4f74f7ea78bcbb69976a8508 (diff)
support nonstandard encoding 'ks_c_5601-1987'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@835 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--libsylph/codeconv.c14
-rw-r--r--libsylph/codeconv.h1
4 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 97adf5c4..064cf165 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-19
+
+ * libsylph/codeconv.[ch]: support nonstandard encoding
+ "ks_c_5601-1987" (thanks to Yoo Chung).
+
2005-12-14
* version 2.1.9
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 0c2fb503..47e17a66 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,8 @@
+2005-12-19
+
+ * libsylph/codeconv.[ch]: 非標準なエンコーディング "ks_c_5601-1987"
+ に対応(Yoo Chung さん thanks)。
+
2005-12-14
* version 2.1.9
diff --git a/libsylph/codeconv.c b/libsylph/codeconv.c
index 6328a2ef..73bebb7f 100644
--- a/libsylph/codeconv.c
+++ b/libsylph/codeconv.c
@@ -1271,10 +1271,16 @@ static gchar *conv_noconv(const gchar *inbuf, gint *error)
static const gchar *
conv_get_fallback_for_private_encoding(const gchar *encoding)
{
- if (encoding && (encoding[0] == 'X' || encoding[0] == 'x') &&
- encoding[1] == '-') {
- if (!g_ascii_strcasecmp(encoding, CS_X_GBK))
- return CS_GBK;
+ if (encoding) {
+ if ((encoding[0] == 'X' || encoding[0] == 'x') &&
+ encoding[1] == '-') {
+ if (!g_ascii_strcasecmp(encoding, CS_X_GBK))
+ return CS_GBK;
+ } else if ((encoding[0] == 'K' || encoding[0] == 'k') &&
+ (encoding[1] == 'S' || encoding[1] == 's')) {
+ if (!g_ascii_strcasecmp(encoding, CS_KS_C_5601_1987))
+ return CS_EUC_KR;
+ }
}
return encoding;
diff --git a/libsylph/codeconv.h b/libsylph/codeconv.h
index 9946cdc5..1920c8f0 100644
--- a/libsylph/codeconv.h
+++ b/libsylph/codeconv.h
@@ -158,6 +158,7 @@ struct _CodeConverter
#define CS_X_SJIS "X-SJIS"
#define CS_ISO_2022_KR "ISO-2022-KR"
#define CS_EUC_KR "EUC-KR"
+#define CS_KS_C_5601_1987 "ks_c_5601-1987"
#define CS_ISO_2022_CN "ISO-2022-CN"
#define CS_EUC_CN "EUC-CN"
#define CS_GB2312 "GB2312"