2007-04-23 Jeffrey Stedfast * README: Bumped version * configure.in: Bumped version to 2.2.7 2007-04-14 Jeffrey Stedfast * gmime/*.c (g_mime_*_get_type): Set n_preallocs to 0. 2007-04-12 Jeffrey Stedfast * gmime/*.c: no need for a second NULL argument to g_object_new() * util/cache.c (cache_new): Change max_size and node_size to be of type size_t. * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_new): g_object_new() doesn't need a second NULL argument. * gmime/gmime-utils.c (decode_8bit): Close the iconv descriptor and since we are using is_ascii() now, we don't need to use unsigned char *'s. 2007-04-12 Jeffrey Stedfast * gmime/gmime-utils.c (decode_8bit): Use is_ascii(). (g_mime_utils_header_decode_text): Same. (g_mime_utils_header_decode_phrase): Here too. * gmime/gen-table.c: Added a is_ascii() macro for use instead of the ctype isascii() so that I don't have to worry about casting. 2007-04-11 Jeffrey Stedfast Revision 1119 (previous commit) made the following 2 functions even less attractive than they already were, so I decided to rewrite them especially since it wasn't hard to find a far cleaner approach. * gmime/gmime-utils.c (g_mime_utils_header_decode_text): Rewritten to be cleaner, faster, and more elegant. (g_mime_utils_header_decode_phrase): Same. 2007-04-11 Jeffrey Stedfast Fixes for bug #423760 and bug #342196 * gmime/gmime-charset.c (g_mime_charset_can_encode): New convenience function to check whether a length of UTF-8 text can be converted into the specified charset. (g_mime_set_user_charsets): New function allowing an application to provide GMime with a list of user-preferred charsets to use for encoding and decoding headers. (g_mime_user_charsets): New function to get the list of user-preferred charsets. * gmime/gmime-utils.c (decode_8bit): New function to convert arbitrary 8bit text into UTF-8 using the charset list provided by g_mime_user_charsets(). (rfc2047_decode_word): Don't assume that just because the declared charset is UTF-8 that it actually is in UTF-8. (rfc2047_decode_word): If we can't open a converter for the declared charset to UTF-8 or if we can't convert from the declared charset into UTF-8, fall back to using decode_8bit(). (g_mime_utils_header_decode_text): Convert 8bit word tokens into UTF-8 using decode_8bit(). (g_mime_utils_header_decode_phrase): Same. (rfc2047_encode_word): Be a little more efficient about removing '\n' chars... (rfc2047_encode): When encoding a level-2 word cluster, attempt to fit the cluster within a charset provided by g_mime_user_charsets() rather than using GMime's best-fit charset table (unless, of course, it doesn't fit within any of the user-specified charsets). 2007-03-28 Jeffrey Stedfast * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): No need to cast out to a char *, it already is. * gmime/gmime-stream-mem.c (g_mime_stream_mem_set_byte_array): Only free the previous memory buffer if we were the owner.