aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Zheng <simon.zheng@sun.com>2006-04-05 11:34:23 +0800
committerSimon Zheng <simonz@src.gnome.org>2006-04-05 11:34:23 +0800
commit6761feca240609a6e30981a1e24cadf80bce3f3f (patch)
tree9ee13e75fca6d8d717964ae120d24d015819f344
parent0d1c0e1e1ae3d5040f8a274b164b6eba3850ca4d (diff)
downloadgsoc2013-evolution-6761feca240609a6e30981a1e24cadf80bce3f3f.tar.gz
gsoc2013-evolution-6761feca240609a6e30981a1e24cadf80bce3f3f.tar.zst
gsoc2013-evolution-6761feca240609a6e30981a1e24cadf80bce3f3f.zip
** Fixes bug #333213 According to POSIX.1 specfication, if iconv()
2006-04-05 Simon Zheng <simon.zheng@sun.com> ** Fixes bug #333213 * e-msg-composer.c: (best_encoding): According to POSIX.1 specfication, if iconv() encounts non-identical characters, it'll return the number of non-identical conversation performed. i.e. returning positive value means exception as well as -1. svn path=/trunk/; revision=31766
-rw-r--r--composer/ChangeLog8
-rw-r--r--composer/e-msg-composer.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 335f434904..cf4c370720 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,11 @@
+2006-04-05 Simon Zheng <simon.zheng@sun.com>
+
+ ** Fixes bug #333213
+ * e-msg-composer.c: (best_encoding): According to POSIX.1
+ specfication, if iconv() encounts non-identical characters, it'll
+ return the number of non-identical conversation performed. i.e.
+ returning positive value means exception as well as -1.
+
2006-03-20 Boby Wang <boby.wang@sun.com>
** Fix for bug #268584
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 5d9c6bc4f4..c543244bc0 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -383,7 +383,7 @@ best_encoding (GByteArray *buf, const char *charset)
} while (status == (size_t) -1 && errno == E2BIG);
e_iconv_close (cd);
- if (status == (size_t) -1)
+ if (status == (size_t) -1 || status > 0)
return -1;
if (count == 0)