[evolution-patches] [Mailer] Fix for 333213



Hi Jeff and all,

Bug 333213, Can't specify the encoding as ISO-8859-15 in mail composer
on Solaris.

In case of encounting non-identical characters, iconv() returns the
number of non-identical conversation performed. So returning positive
value means exception as well as -1.

Sending patch for review.

Thanks,
-Simon
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.736
diff -u -p -r1.736 ChangeLog
--- ChangeLog	24 Feb 2006 08:15:43 -0000	1.736
+++ ChangeLog	7 Mar 2006 02:46:08 -0000
@@ -1,3 +1,11 @@
+2006-03-07  Simon Zheng  <simon zheng sun com>
+
+	** Fixes bug #333213
+	* e-msg-composer.c: (best_encoding): According to POSIX.1 
+	specfication, if iconv() encounting non-identical characters, it 
+	returns the number of non-identical conversation performed. i.e.
+	returning positive value both means exception as well as -1.
+
 2006-02-16  Rohini S  <srohini novell com>
 
 	** Fixes bug #324742
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.530
diff -u -p -r1.530 e-msg-composer.c
--- e-msg-composer.c	24 Feb 2006 08:15:43 -0000	1.530
+++ e-msg-composer.c	7 Mar 2006 02:46:08 -0000
@@ -383,7 +383,7 @@ best_encoding (GByteArray *buf, const ch
 	} 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]