[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-78-g786ecbd

ticho at claws-mail.org ticho at claws-mail.org
Wed Feb 14 23:04:11 CET 2018


The branch, gtk3 has been updated
       via  786ecbd7a8ad4202498463e238d29d5baf4b4bcc (commit)
      from  2e73f732059937e719536b730da899e3441b5eba (commit)

Summary of changes:
 src/codeconv.c |   24 ++++++++++++++++++------
 src/codeconv.h |    1 +
 2 files changed, 19 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 786ecbd7a8ad4202498463e238d29d5baf4b4bcc
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Wed Feb 14 23:03:17 2018 +0100

    Add support for the iso-8859-8-i encoding
    
    Support this encoding by aliasing it to iso-8859-8.

diff --git a/src/codeconv.c b/src/codeconv.c
index 0d2438b..4fb3f69 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -706,12 +706,24 @@ static gint conv_noconv(gchar *outbuf, gint outlen, const gchar *inbuf)
 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_MACCYR))
-			return CS_MACCYR;
-		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_MACCYR))
+				return CS_MACCYR;
+			if (!g_ascii_strcasecmp(encoding, CS_X_GBK))
+				return CS_GBK;
+		}
+		else if(!g_ascii_strcasecmp(encoding, CS_ISO_8859_8_I)) {
+			/*
+			 * ISO-8859-8-I is a variant which fully
+			 * agrees with ISO-8859-8 on character
+			 * codings, and differs only in directionality
+			 * implications, which are ignored here
+			 * anyway; and is not recognized by iconv
+			 */
+			return CS_ISO_8859_8;
+		}
 	}
 
 	return encoding;
diff --git a/src/codeconv.h b/src/codeconv.h
index f025864..9cf2596 100644
--- a/src/codeconv.h
+++ b/src/codeconv.h
@@ -116,6 +116,7 @@ struct _CodeConverter
 #define CS_ISO_8859_6		"ISO-8859-6"
 #define CS_ISO_8859_7		"ISO-8859-7"
 #define CS_ISO_8859_8		"ISO-8859-8"
+#define CS_ISO_8859_8_I	"ISO-8859-8-I"
 #define CS_ISO_8859_9		"ISO-8859-9"
 #define CS_ISO_8859_10		"ISO-8859-10"
 #define CS_ISO_8859_11		"ISO-8859-11"

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list