Commit Graph

100 Commits

Author SHA1 Message Date
91195af48f New function to replace the one from camel-mime-part.c
2003-09-18  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (camel_transfer_encoding_to_string): New
	function to replace the one from camel-mime-part.c
	(camel_transfer_encoding_from_string): Same.
	(camel_content_transfer_encoding_decode): Renamed from
	camel_header_content_encoding_decode().

	* camel-mime-part.c (camel_mime_part_encoding_to_string): Removed.
	(camel_mime_part_encoding_from_string): Removed.

	* camel-data-wrapper.[c,h]: updated for CamelTransferEncoding
	namespace changes

	* camel-folder-summary.c: updated for CamelTransferEncoding
	namespace changes

	* camel-mime-filter-bestenc.[c,h]: updated for CamelTransferEncoding
	namespace changes

	* camel-mime-message.c: updated for CamelTransferEncoding
	namespace changes

	* camel-mime-part-utils.c: updated for CamelTransferEncoding
	namespace changes

	* camel-multipart-signed.c: updated for CamelTransferEncoding
	namespace changes

	* camel-smime-context.c: updated for CamelTransferEncoding
	namespace changes

	* providers/imapp/camel-imapp-utils.c: updated for
	CamelTransferEncoding namespace changes

	* tests/lib/messages.c: updated for CamelTransferEncoding
	namespace changes

	* tests/message/test1.c: updated for CamelTransferEncoding
	namespace changes

svn path=/trunk/; revision=22617
2003-09-18 19:02:15 +00:00
df21ede0c7 s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g and
2003-08-26  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-parser.[c,h]: s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g and
	s/_header_state/_camel_mime_parser_state/g

	* camel-filter-driver.c: Same.

	* camel-folder-summary.c: Here too.

	* camel-http-stream.c: And here.

	* camel-mime-message.c: ...

	* camel-mime-part-utils.c: ...

	* camel-mime-part.c: ...

	* camel-movemail.c: ...

	* camel-multipart-signed.c: ...

	* camel-multipart.c: ...

	* providers/local/camel-mbox-folder.c: ...

	* providers/local/camel-mbox-summary.c: ...

	* providers/local/camel-mh-summary.c: ...

	* providers/nntp/camel-nntp-summary.c: ...

	* providers/pop3/camel-pop3-folder.c: ...

2003-08-25  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.[c,h]: Namespaced.

	* camel-data-wrapper.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-digest-folder.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-filter-driver.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-filter-search.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-folder-search.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-folder-summary.[c,h]: updated for namespace changed made
	to camel-mime-utils.[c,h]

	* camel-http-stream.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-http-stream.h: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-internet-address.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-medium.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-message.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-parser.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-part-utils.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-part.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-movemail.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-multipart-encrypted.c: updated for namespace changed made
	to camel-mime-utils.[c,h]

	* camel-multipart-signed.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-multipart.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-search-private.[c,h]: updated for namespace changed made
	to camel-mime-utils.[c,h]

	* camel-types.h: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* providers/imap/camel-imap-folder.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/imap/camel-imap-store-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/imap/camel-imap-utils.c: updated for namespace changed
	made to camel-mime-utils.[c,h]

	* providers/imapp/camel-imapp-utils.[c,h]: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-local-summary.[c,h]: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-maildir-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-mbox-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-spool-summary.h: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/nntp/camel-nntp-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/nntp/camel-nntp-utils.c: updated for namespace changed
	made to camel-mime-utils.[c,h]

	* providers/pop3/camel-pop3-folder.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/sendmail/camel-sendmail-transport.c: updated for
	namespace changed made to camel-mime-utils.[c,h]

	* providers/smtp/camel-smtp-transport.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

svn path=/trunk/; revision=22613
2003-09-18 17:07:09 +00:00
04b9ec51d4 temporarily reverting my camel namespace patches until after we merge in some of the other branches
svn path=/trunk/; revision=22373
2003-08-26 18:16:51 +00:00
cea825b209 s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g and
2003-08-26  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-parser.[c,h]: s/HSCAN_/CAMEL_MIME_PARSER_STATE_/g and
	s/_header_state/_camel_mime_parser_state/g

	* camel-filter-driver.c: Same.

	* camel-folder-summary.c: Here too.

	* camel-http-stream.c: And here.

	* camel-mime-message.c: ...

	* camel-mime-part-utils.c: ...

	* camel-mime-part.c: ...

	* camel-movemail.c: ...

	* camel-multipart-signed.c: ...

	* camel-multipart.c: ...

	* providers/local/camel-mbox-folder.c: ...

	* providers/local/camel-mbox-summary.c: ...

	* providers/local/camel-mh-summary.c: ...

	* providers/nntp/camel-nntp-summary.c: ...

	* providers/pop3/camel-pop3-folder.c: ...

svn path=/trunk/; revision=22365
2003-08-26 16:06:03 +00:00
e74d9ca1cc Namespaced.
2003-08-25  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.[c,h]: Namespaced.

	* camel-data-wrapper.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-digest-folder.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-filter-driver.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-filter-search.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-folder-search.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-folder-summary.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-http-stream.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-http-stream.h: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-internet-address.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-medium.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-message.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-parser.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-part-utils.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-mime-part.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-movemail.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-multipart-encrypted.c: updated for namespace changed made
	to camel-mime-utils.[c,h]

	* camel-multipart-signed.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-multipart.c: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-search-private.[c,h]: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* camel-types.h: updated for namespace changed made to
	camel-mime-utils.[c,h]

	* providers/imap/camel-imap-folder.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/imap/camel-imap-store-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/imap/camel-imap-utils.c: updated for namespace changed
	made to camel-mime-utils.[c,h]

	* providers/imapp/camel-imapp-utils.[c,h]: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-local-summary.[c,h]: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-maildir-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-mbox-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/local/camel-spool-summary.h: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/nntp/camel-nntp-summary.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/nntp/camel-nntp-utils.c: updated for namespace changed
	made to camel-mime-utils.[c,h]

	* providers/pop3/camel-pop3-folder.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

	* providers/sendmail/camel-sendmail-transport.c: updated for
	namespace changed made to camel-mime-utils.[c,h]

	* providers/smtp/camel-smtp-transport.c: updated for namespace
	changed made to camel-mime-utils.[c,h]

svn path=/trunk/; revision=22355
2003-08-25 21:01:55 +00:00
87b5d92a77 ** See bug #47634.
2003-08-15  Not Zed  <NotZed@Ximian.com>

        ** See bug #47634.

        * tests/lib/messages.c (test_message_compare): check
        write_to_stream returns.
        (message_dump_rec): helper to dump message structure.

        * camel-mime-part-utils.c
        (simple_data_wrapper_construct_from_parser): dont set content
        encoding here.
        (camel_mime_part_construct_content_from_parser): set it here
        instead, on every part.  basically same as setting the
        mime_type_field always.

        * camel-multipart-signed.c (camel_multipart_signed_class_init):
        * camel-mime-message.c (camel_mime_message_class_init):
        * camel-multipart.c (camel_multipart_class_init): override
        decode_to_stream to always do the same as write_to_stream, since
        we can never be encoded.

svn path=/trunk/; revision=22252
2003-08-15 20:57:30 +00:00
b328a21e7c New test suite for the mime parser (which is where the below 2 fixes were
* tests/message/test4.c: New test suite for the mime parser (which
	is where the below 2 fixes were noticed).

	* camel-mime-parser.c (folder_boundary_check): Calculate 'len' by
	subtracting the boundary start from inend rather than 'atleast'.
	(folder_scan_content): Calculate 'inend' differently depending on
	the EOF state.

2003-08-08  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-filter-tohtml.c (html_convert): Rather than checking
	*inptr == '\n', check inptr >= inend - this gets rid of an Invalid
	Read report from valgrind.

	* camel-mime-part.c (write_to_stream): Don't necessarily re-encode
	just because the encodings differ. Need to look into making it so
	that message/rfc822 and multipart parts ignore the
	Content-Transfer-Encoding header and just keep their 'encoding'
	bits set to DEFAULT.

2003-08-05  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-folder.c (get_content): Updated.

	* camel-mime-message.c (camel_mime_message_init): Don't override
	the mime_type here.
	(process_header): Updated to use CamelDataWrapper's mime_type
	field.
	(find_best_encoding): Same.
	(best_encoding): Here too.

	* camel-digest-folder.c (camel_digest_folder_new): Updated for
	CamelMimePart::content_type change.

	* camel-mime-part.c (camel_mime_part_init): Override our parent
	class's default mime_type.
	(camel_mime_part_finalize): Don't need to unref the content_type
	anymore.
	(process_header): Updated to use CamelDataWrapper's mime_type
	field.
	(camel_mime_part_set_filename): Same.
	(camel_mime_part_get_filename): Same.
	(camel_mime_part_get_content_type): Same.
	(set_content_object): Here too.
	(write_to_stream): Updated.
	(construct_from_parser): Updated.

	* camel-mime-part.h: Remove the content_type field.

2003-07-31  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/lib/messages.c (test_message_compare_content): If the
	chunks differ, perform a hexdump on the data being compared so
	that we may analyse it easier.

	* camel-multipart-signed.c (write_to_stream): Return ssize_t.

	* camel-mime-utils.h: Added the CamelMimePartEncodingType enum
	here.

	* camel-mime-part.h: Removed the CamelMimePartEncodingType enum
	from here.

	* camel-mime-part.c (write_to_stream): Updated to return
	ssize_t. Also minor changes to only re-encode the content stream
	if the charset or encoding changed (this way we write it out in
	the original raw form if nothing changed).

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Drastically
	simplify. We no longer scan html content to try and find the
	charset, nor do we care about converting the content to UTF-8 and
	handling broken windows charsets.

	* camel-mime-message.c (find_best_encoding): Use
	decode_to_stream() here. Also updated to not assume the content
	charset is UTF-8 since it is very likely not the case anymore
	since data-wrappers no longer are converted to UTF-8 at parse
	time.

	* camel-folder-summary.c (summary_build_content_info_message): Use
	decode_to_stream instead here too.

	* camel-folder-search.c (match_words_1message): Use
	decode_to_stream instead of write_to_stream so we can search the
	contents.

	* camel-data-wrapper.c (camel_data_wrapper_init): Set the default
	encoding to DEFAULT.
	(write_to_stream): Updated to return ssize_t
	(camel_data_wrapper_decode_to_stream): New virtual function to
	decode a data wrapper to a stream (results in nearly identical
	behaviour to the old write_to_stream method).
	(decode_to_stream): Default implementation of above virtual
	method. Decodes base64/qp/etc streams.

	* camel-data-wrapper.h: Removed the rawtext bit and added an
	encoding member.

svn path=/trunk/; revision=22171
2003-08-11 17:57:45 +00:00
baf3f78660 Revert my previous changes to this function.
2003-07-23  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-message.c (find_best_encoding): Revert my previous
	changes to this function.

	* camel-mime-utils.h: Revert previous changes.

	* camel-mime-part.h: Revert previous changes.

	* camel-mime-part-utils.c: Revert previous changes.

	* camel-data-wrapper.c (camel_data_wrapper_init): Revert previous
	changes.
	(write_to_stream): Revert previous changes.

svn path=/trunk/; revision=21920
2003-07-23 17:21:57 +00:00
b83ddf044c Add the CamelMimePartEncodingType definition here.
2003-07-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.h: Add the CamelMimePartEncodingType definition
	here.

	* camel-mime-part.h: Remove the CamelMimePartEncodingType
	definition.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Don't do any of the
	auto-detection we used to do here anymore. Just read the content
	into a memory buffer and record the encoding type.
	(camel_mime_part_construct_content_from_parser): Don't mangle the
	Content-Type struct here anymore.

	* camel-data-wrapper.c (camel_data_wrapper_init): Init encoding to
	DEFAULT.
	(write_to_stream): If the stream needs to be decoded, decode it.

svn path=/trunk/; revision=21842
2003-07-16 20:45:26 +00:00
8bbe0f34af Updated for string-utils namespace changes.
2003-07-07  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-session.c (camel_session_init): Updated for string-utils
	namespace changes.

	* camel-provider.c: Updated for string-utils namespace changes.

	* camel-mime-part.c (init_header_name_table): Updated for
	string-utils namespace changes.

	* camel-mime-message.c (camel_mime_message_class_init): Updated
	for string-utils namespace changes.
	(camel_mime_message_init): Same.

	* camel-mime-filter-enriched.c
	(camel_mime_filter_enriched_class_init): Updated for string-utils
	namespace changes.

	* camel-folder-summary.c (camel_folder_summary_init): Updated for
	string-utils namespace changes.

	* camel-string-utils.[c,h]: Renamed from string-utils.[c,h] and
	also namespaced all functions.

svn path=/trunk/; revision=21751
2003-07-07 19:18:57 +00:00
5ea1f1d1cf Partial fix for bug #44457.
2003-06-11  Jeffrey Stedfast  <fejj@ximian.com>

	Partial fix for bug #44457.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Make sure to set
	rawtext to FALSE if we successfully convert the text to UTF-8.

	* camel-data-wrapper.c (camel_data_wrapper_init): Default the
	value of rawtext to TRUE instead of FALSE. This way if the mailer
	decides to try displaying a non-textual part as text, it knows
	that it needs to convert the content to UTF-8.

svn path=/trunk/; revision=21420
2003-06-12 04:48:05 +00:00
c8de5a0059 Ensure cmdbuf is initialized to avoid compiler warning.
2003-05-16  Jeremy Katz  <katzj@redhat.com>

 	* providers/smtp/camel-smtp-transport.c (smtp_helo): Ensure cmdbuf
 	is initialized to avoid compiler warning.

 	* providers/local/camel-mbox-summary.c (summary_header_load): Cast
 	folder_size to uint32 to fix warning.
 	(camel_mbox_summary_sync_mbox): Update for new API.

 	* providers/imap/camel-imap-utils.c (parse_params):
 	imap_parse_nstring expects size_t, not int
 	(imap_body_decode): Likewise.

 	* camel-stream-filter.c (do_read): presize needs to be size_t
 	instead of int.
 	(do_write): Likewise.

 	* camel-seekable-substream.c (stream_read): Return ssize_t instead
 	of int to match prototypes.
 	(stream_write): Likewise.

 	* camel-mime-part.c (construct_from_parser): len needs to be
 	size_t instead of int.

 	* camel-mime-parser.c (folder_scan_step): datalength needs to be a
 	size_t* instead of an int* to make dependent APIs safe.
 	(camel_mime_parser_step): Likewise.
 	(folder_scan_content): Likewise.
 	* camel-mime-parser.h: Likewise.

 	* camel-mime-message.c (camel_mime_message_class_init): Use glib
 	macro for pointer/int conversions.
 	(construct_from_parser): Update for new API.

 	* camel-folder-summary.c
 	(camel_folder_summary_info_new_from_parser): Update len to be
 	size_t for new API.
 	(summary_build_content_info): Likewise.
 	* camel-http-stream.c (http_get_headers): Likewise.
 	* camel-mime-part-utils.c
 	(simple_data_wrapper_construct_from_parser): Likewise.
 	* camel-multipart-signed.c (signed_construct_from_parser): Likewise.
 	* camel-multipart.c (construct_from_parser): Likewise.

 	* camel-folder-search.c (match_words_index): Use glib macros for
 	pointer/int conversions.
 	* camel-html-parser.c (tokenise_setup): Likewise.
 	(convert_entity): Likewise.
 	* camel-block-file.c (block_hash_func): Likewise.
 	(camel_block_file_get_block): Likewise.
 	(camel_block_file_get_block): Likewise.
 	(camel_block_file_detach_block): Likewise.
 	* camel-session.c (session_thread_msg_new): Likewise.
 	(session_thread_msg_free): Likewise.
 	(session_thread_wait): Likewise.
 	* camel-text-index.c (text_index_compress_nosync): Likewise.
 	(text_index_compress_nosync): Likewise.
 	(camel_text_index_validate): Likewise.
 	* camel-vee-folder.c (vee_folder_remove_folder): Likewise.
 	(unmatched_check_uid): Likewise.
 	(folder_added_uid): Likewise.
 	(vee_folder_build_folder): Likewise.
 	(folder_changed_add_uid): Likewise.
 	(folder_changed_remove_uid): Likewise.
 	* providers/imap/camel-imap-search.c (imap_body_contains): Likewise.
 	* providers/pop3/camel-pop3-folder.c (cmd_list): Likewise.
 	(cmd_uidl): Likewise.

 	* camel-data-cache.c (data_cache_init): Cast to CamelCopyFunc.
 	Fixes a warning.

svn path=/trunk/; revision=21220
2003-05-16 18:47:59 +00:00
a64932a775 Don't call g_utf8_validate on an empty message. Fixes a warning.
* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Don't call
	g_utf8_validate on an empty message. Fixes a warning.

svn path=/trunk/; revision=21099
2003-05-04 19:11:39 +00:00
6b479c5f9f Dont assume adding 1 to line length will go to the next line. e.g. for dos
2003-04-17  Not Zed  <NotZed@Ximian.com>

        * camel-multipart-signed.c (parse_content): Dont assume adding 1
        to line length will go to the next line.  e.g. for dos lines that
        end in \r\n.  Fix for #41163.
        (parse_boundary): util function to help above.

svn path=/trunk/; revision=20874
2003-04-17 03:09:37 +00:00
b3293f0d99 Do a more thorough check for html marked as text/plain. Check that the
2003-03-28  Not Zed  <NotZed@Ximian.com>

	*
	camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
	Do a more thorough check for html marked as text/plain.  Check
	that the text starts with <html or <!doctype.  More complete fix
	for #16817.

svn path=/trunk/; revision=20544
2003-03-27 06:05:46 +00:00
2e5eb47695 Camel part of the fix for Lewing's bug #39204. Second half of the patch
2003-03-21  Jeffrey Stedfast  <fejj@ximian.com>

	Camel part of the fix for Lewing's bug #39204. Second half of the
	patch should also fix it so that text/plain parts that are
	detected as being text/html are rendered as html (not that I agree
	with this mind you, but corporate customers want this "feature").

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): If the part is
	text/html and doesn't have a charset and we are able to find a
	charset in the meta tags of the html content, set the charset
	param on the content-type.
	(camel_mime_part_construct_content_from_parser): After setting the
	content object on the mime part, re-set the content-type of the
	content object back to the one from the parser (as it may contain
	changes from the original - see changes made to the ct in
	simple_data_wrapper_construct_from_parser for details).

svn path=/trunk/; revision=20463
2003-03-21 21:54:59 +00:00
35bce81941 canonicalise the charset name (if it is an iso charset) so that our
2003-02-25  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): canonicalise the
	charset name (if it is an iso charset) so that our strncasecmp to
	see if it is an iso-8859-# charset will be guarenteed to work on
	all systems.
	(canon_charset_name): New function to return the canonical iso
	charset name.
	(simple_data_wrapper_construct_from_parser): If the charset is
	NULL *or* the charset == "us-ascii" then check that it is 7bit
	clean to decide if it is rawtext (we did not check the case where
	charset was "us-ascii" before).

svn path=/trunk/; revision=20057
2003-02-25 20:07:35 +00:00
74205e83d1 Same as the ones below.
2003-02-25  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-message.c: Same as the ones below.

	* camel-mime-part.c: Reverted back to pre-camel-iconv

	* camel-filter-search.c: Same as below.

	* camel-folder-summary.c: Reverted back to pre-camel-iconv

	* camel.c (camel_init): Reverted to pre-camel-iconv

	* camel-charset-map.c (camel_charset_locale_name): Removed (part
	of the revert).
	(camel_charset_canonical_name): Same.

	* camel-mime-filter-charset.c: Revert back to using e_iconv from GAL.

	* camel-mime-part-utils.c: Revert back to using e_iconv from GAL.

	* camel-mime-utils.c: Revert back to using e_iconv from GAL.

	* camel-sasl-digest-md5.c: Revert back to using e-iconv from GAL.

svn path=/trunk/; revision=20056
2003-02-25 19:43:22 +00:00
abada7e2cd Call camel_iconv_init(). (camel_shutdown): Call camel_iconv_shutdown().
2003-02-20  Jeffrey Stedfast  <fejj@ximian.com>

	* camel.c (camel_init): Call camel_iconv_init().
	(camel_shutdown): Call camel_iconv_shutdown().

	* camel-sasl-digest-md5.c (digest_response): Updated to use
	camel-iconv and the new camel-charset-map functions.

	* camel-mime-utils.c: Updated to use camel-iconv and the new
	camel-charset-map functions.

	* camel-mime-part-utils.c (check_html_charset): Use
	camel_charset_canonical_name() instead of e_iconv_charset_name()
	which is longer available.
	(convert_buffer): Use camel-iconv.
	(simple_data_wrapper_construct_from_parser): Since
	camel_charset_iso_to_windows() returns the charset in it's
	canonical format, no need to re-canonicalise it.

	* camel-mime-part.c (process_header): Use
	camel_charset_canonical_name() instead of e_iconv_charset_name()
	which is longer available.

	* camel-mime-message.c (process_header): Use
	camel_charset_canonical_name() instead of e_iconv_charset_name()
	which is longer available.

	* camel-mime-filter-charset.c: Use camel-iconv.

	* camel-folder-summary.c (message_info_new): Use
	camel_charset_canonical_name() instead of e_iconv_charset_name()
	which is longer available.
	(content_info_new): Use camel_charset_locale_name().
	(camel_message_info_new_from_header): Same as message_info_new().

	* camel-search-private.c: Use g_alloca() instead of alloca().

	* camel-filter-search.c (check_header): Use
	camel_charset_canonical_name() instead of e_iconv_charset_name()
	which is longer available.

	* camel-charset-map.c (camel_charset_locale_name): New function,
	replaces e_iconv_locale_charset().
	(camel_charset_canonical_name): New function, similar to
	e_iconv_charset_name() but instead of returning the iconv-friendly
	name, it returns the canonical name. (g_iconv will do the
	iconv-friendly name conversions for us).

svn path=/trunk/; revision=19977
2003-02-20 21:04:19 +00:00
7d7d2b7729 Detect text/html parts that were marked as text/plain and re-tag them as
2002-12-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Detect text/html
	parts that were marked as text/plain and re-tag them as text/html
	parts. Note: currently just checks if the first non-lwsp char is a
	'<' - but we might need to be smarter about this? *sigh* Stupid
	Windows mailers.

svn path=/trunk/; revision=19143
2002-12-16 23:45:41 +00:00
3eabd14ace Use g_strerror when setting an exception string (we need it to be in
2002-11-11  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-spool-summary.c (spool_summary_sync_full):
	Use g_strerror when setting an exception string (we need it to be
	in UTF-8).
	(spool_summary_check): Here too.

	* providers/local/camel-spool-store.c (construct): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).
	(get_folder): Same.
	(scan_dir): Here too.

	* providers/local/camel-spool-folder.c (spool_lock): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/local/camel-mh-summary.c (mh_summary_check): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/local/camel-mh-store.c (delete_folder): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).

	* providers/local/camel-mbox-summary.c (summary_update): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).
	(mbox_summary_sync_full): Here too.
	(mbox_summary_sync_quick): Same.
	(mbox_summary_sync): Also here.
	(camel_mbox_summary_sync_mbox): Again here.

	* providers/local/camel-mbox-folder.c (mbox_lock): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).
	(mbox_append_message): Same.
	(mbox_get_message): Here too.

	* providers/local/camel-maildir-summary.c (maildir_summary_load):
	Use g_strerror when setting an exception string (we need it to be
	in UTF-8).
	(maildir_summary_check): Same.

	* providers/local/camel-maildir-store.c (get_folder): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).
	(delete_folder): Same.
	(delete_folder): Here too.

	* providers/local/camel-local-summary.c (local_summary_sync): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/local/camel-local-store.c (get_folder): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).
	(create_folder): Same.
	(xrename): Here too.
	(rename_folder): And here.
	(delete_folder): Also here.

	* camel-provider.c (camel_provider_init): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).

	* camel-movemail.c (camel_movemail): Use g_strerror when setting
	an exception string (we need it to be in UTF-8).
	(movemail_external): Same.
	(camel_movemail_copy_file): Here too.
	(camel_movemail_solaris): Also here.

	* camel-mime-utils.c (rfc2047_decode_word): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).
	(header_encode_param): Same.

	* camel-mime-part-utils.c (convert_buffer): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).

	* camel-lock-client.c (camel_lock_helper_init): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).

	* camel-data-cache.c (camel_data_cache_remove): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).

	* camel-tcp-stream-raw.c (flaky_tcp_write): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).
	(flaky_tcp_read): Same.

	* camel-gpg-context.c (gpg_ctx_op_step): For debugging printfs, we
	want to use normal strerror (we want locale charset, not UTF-8).

	* camel-service.c (camel_gethostbyname): Use g_strerror when
	setting an exception string (we need it to be in UTF-8).

	* camel-lock.c (camel_lock_dot): Use g_strerror when setting an
	exception string (we need it to be in UTF-8).
	(camel_lock_fcntl): Same.

svn path=/trunk/; revision=18689
2002-11-11 06:24:56 +00:00
c8b587d9c5 Created temporary link list, we need to link with something for gettext.
2002-11-05  Not Zed  <NotZed@Ximian.com>

	* Makefile.am (camel_lock_helper_LDADD): Created temporary link
	list, we need to link with something for gettext.

	* camel.h: Remove gstring-util.h and hash-table-utils.h.

	* camel-text-index.c:
	(text_index_normalise): Changed for g_utf8_strdown api change.

	* camel-search-private.c:
	* camel-mime-utils.c:
	* camel-mime-part-utils.c:
	* camel-html-parser.c:
	* camel-charset-map.c: Include glib/gunicode.h from glib instead
	of gal.

	* camel-filter-driver.c: Remove include of gtk/gtk.h, should never
	have been there.

svn path=/trunk/; revision=18542
2002-11-05 09:05:24 +00:00
f48db35928 Remove a ton of useless snot.
2002-10-31  Jeffrey Stedfast  <fejj@ximian.com>

	Remove a ton of useless snot.

	* Makefile.am: Remove gstring-util.[c,h] from the build.

	* gstring-util.[c,h]: Removed.

	* string-utils.c (string_equal_for_glist): Removed.
	(string_split): Removed.
	(string_trim): Removed.
	(string_prefix): Removed.
	(string_unquote): Removed.
	(strip): Removed.

	* hash-table-utils.c (g_hash_table_generic_free): Removed.

	g_str[n]casecmp functions are deprecated in glib2.

	* string-utils.c (strstrcase): Use strncasecmp instead of
	g_strncasecmp.

	* hash-table-utils.c (g_strcase_equal): Use strcasecmp
	instead of g_strcasecmp.

	* camel-smime-utils.c (camel_smime_is_smime_v3_signed): Same.
	(camel_smime_is_smime_v3_encrypted): Here too.

	* camel-sasl-digest-md5.c (decode_data_type): And here.
	(parse_server_challenge): Again here.

	* camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): Same.
	(camel_pgp_mime_is_rfc2015_encrypted): Same

	* camel-mime-part-utils.c (check_html_charset): Here too.

	* camel-folder-summary.c (camel_system_flag): Same.

svn path=/trunk/; revision=18472
2002-10-31 21:41:26 +00:00
d4963655fe Changed to use a different length calculator.
2002-07-19  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part-utils.c (convert_buffer): Changed to use a
        different length calculator.

svn path=/trunk/; revision=17519
2002-07-19 11:25:02 +00:00
ad3524ee83 oops, changed the location of where we check for multipart/encrypted
svn path=/trunk/; revision=17435
2002-07-12 06:59:08 +00:00
36b6d6469d Handle multipart/encrypted parts too.
2002-07-12  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-folder.c (get_content): Handle
	multipart/encrypted parts too.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Handle
	multipart/encrypted types too.

svn path=/trunk/; revision=17434
2002-07-12 06:27:11 +00:00
1c309b14c4 Added a protocol field for users to use.
2002-05-30  Not Zed  <NotZed@Ximian.com>

        * camel-cipher-context.h: Added a protocol field for users to use.

        * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD
        not READ_SIZE.  Big difference.
        (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line
        in full.

        * providers/imap/camel-imap-folder.c (get_content): Changed to
        load multipart/signed as an opaque block into the right kind of
        object.

        * camel-multipart.h (struct _CamelMultipart): Removed the boundary
        field.  It wans't actually used anywhere.

        * camel-seekable-substream.c
        (camel_seekable_substream_new_with_seekable_stream_and_bounds):
        Shortened this stupidly long name to just :new(), its the only way
        its ever used.  Fixed all callers.

        * camel-multipart-signed.[ch]: new wrapper for multipart/signed
        types.  We need to treat the entire content as a blob of data for
        transport purposes.  This also cleans up a lot of the sign/verify
        handling.

        * camel-mime-part-utils.c
        (camel_mime_part_construct_content_from_parser): Just call
        camel_multipart_construct_from_parser for multipart parts, also
        use a multipart_signed for multipart/signed types.

        * camel-multipart.c (camel_multipart_construct_from_parser): New
        virtual function for multiparts to buld themselves.
        (construct_from_parser): Implement for normal multiparts.
        (toplevel): Got rid of a warning, it'll never be an abstract
        class.

        * camel-pgp-context.c (pgp_hash_to_id):
        (pgp_id_to_hash): Implement.
        (camel_pgp_context_init): Init the pgp protocol specifier.

        * camel-cipher-context.c (camel_cipher_id_to_hash):
        (camel_cipher_hash_to_id): Util virtual methods to handle the
        cipher id string.

        * camel-mime-filter-canon.[ch]: A new filter, end/start of line
        canonicalisation filter.  Can escape "From " and strip trailing
        whitespace, and canonicalise the end of line to crlf or to lf.

2002-05-29  Not Zed  <NotZed@Ximian.com>

        * camel-multipart.h (struct _CamelMultipart): Removed the
        'parent', nothing used it, anywhere.  Cleaned up some formatting
        slightly.

svn path=/trunk/; revision=17057
2002-05-31 01:05:47 +00:00
9f6c9f9e1d If the last message(s) were deleted, and we had any messages output,
2002-04-11  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-summary.c (spool_summary_sync_full):
        If the last message(s) were deleted, and we had any messages
        output, account for the lost \n of the following From line by
        adding an extra \n. fix for #8214.

2002-04-10  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
        input, return a 0 lenght output as valid - fixes bugs with some
        iconv impl and its simpler anyway.

svn path=/trunk/; revision=16438
2002-04-11 09:00:57 +00:00
bf2a13c1ef oops, after converting everything truncate the GByteArray to the correct length (in case we over-allocated)
svn path=/trunk/; revision=16429
2002-04-10 20:03:51 +00:00
5a08bd3e44 Fixed a bug that would miscalculate how much data to copy into the
2002-04-10  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
	miscalculate how much data to copy into the GByteArray (negative
	value) thus causing a segfault. Also optimized it while I was at
	it.

svn path=/trunk/; revision=16428
2002-04-10 19:59:13 +00:00
ffb7357c42 Reverted my pgp/mime fixes here too.
2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Reverted my
	pgp/mime fixes here too.

	* camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
	stream hack, this is causing problems such as some messages to not
	displaying, view->source not working at all, etc.

svn path=/trunk/; revision=15883
2002-03-01 20:30:15 +00:00
6b89252b9f Rearrange the save filter stuff so that we save raw streams for all mime
2002-02-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Rearrange the
	save filter stuff so that we save raw streams for all mime
	parts. If the mime part turns out to be a multupart, then don't
	bother saving the raw stream, we only need to save the raw stream
	for leaf parts.

svn path=/trunk/; revision=15873
2002-02-28 20:37:11 +00:00
dfee77a151 only save raw streams for leaf parts.
svn path=/trunk/; revision=15868
2002-02-28 03:09:07 +00:00
e1fa571225 Don't #include camel-mime-filter-save.h, we don't use it.
2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
	we don't use it.

	* camel-file-utils.c: Fixed a few 'might be used uninitialized'
	warnings which were real problems.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Save the raw mime
	stream for any/all signed parts.

	* camel-mime-part.c (camel_mime_part_init): Initialize our raw
	stream to NULL.
	(camel_mime_part_finalize): Unref our raw stream, if we have one.
	(write_to_stream): If we have a raw stream, write that out instead
	of re-encoding.

	* camel-mime-filter-save.[c,h]: Rewritten to save to a stream
	rather than a file.

svn path=/trunk/; revision=15867
2002-02-28 02:28:12 +00:00
fceffac25c revert my "simplification" of the last commit, it was broken - I must have been brain-dead when I wrote it.
svn path=/trunk/; revision=15149
2001-12-18 17:59:57 +00:00
f6408daa10 New function to map ISO charsets to the Windows charsets.
2001-12-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-charset-map.c (camel_charset_iso_to_windows): New function
	to map ISO charsets to the Windows charsets.

	* camel-mime-part-utils.c (broken_windows_charset): Detect Windows
	charsets.
	(simple_data_wrapper_construct_from_parser): Simplify a tad and
	also check for iso-8859-* charsets that are really Windows
	charsets. Fixes bug #12631.

svn path=/trunk/; revision=15144
2001-12-18 01:28:27 +00:00
081f6dbb1b Protect against either of the types being NULL.
2001-12-04  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_content_type_simple): Protect against
	either of the types being NULL.

2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-filter-basic.c (filter): If complete() allocates
	len+2 bytes for the out buffer, so should this. See bug #16371 for
	an example case.

2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.

	* camel-pgp-context.c: The return value of iconv() is a size_t,
	not an int.

	* camel-mime-part-utils.c (convert_buffer): Always use size_t args
	for iconv().

	* camel-mime-filter-charset.c (complete): Always use size_t args
	for iconv().
	(filter): Same.

	* camel-mime-utils.c (header_address_fold): Make headerlen a
	size_t instead of an int.
	(header_fold): Same.
	(base64_encode_close): We should be returning a size_t and inlen
	should also be a size_t.
	(base64_encode_step): Same here.
	(base64_decode_step): Here too.
	(base64_encode_simple): And here...
	(base64_decode_simple): Same.
	(uuencode_close): We should also use size_t's here...
	(uuencode_step): And here too.
	(uudecode_step): And also here.
	(quoted_encode_close): Same idea here.
	(quoted_encode_step): Again here.
	(quoted_decode_step): Here too.
	(quoted_encode): Input length should be a size_t.
	(rfc2047_decode_word): Same.
	(g_string_append_len): Here too.
	(append_8bit): "
	(rfc2047_encode_word): "
	(quote_word): "
	(hex_decode): "
	(rfc2184_decode): Use size_t's with iconv().
	(header_decode_param): Same.

svn path=/trunk/; revision=14956
2001-12-10 19:14:32 +00:00
7228996216 For the uudecoding mode, garble up the "begin <mode> <filename>" line
2001-11-26  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-filter-basic.c: For the uudecoding mode, garble up
	the "begin <mode> <filename>" line before decoding.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Add a uudecoder if
	the transfer encoding is x-uuencode.

	* camel-mime-part.c (write_to_stream): Handle x-uuencoded content
	too.

svn path=/trunk/; revision=14789
2001-11-26 21:30:55 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
5
5b449d9ca7 Remove the stupid warning that should never have been there in the first
2001-10-25    <NotZed@Ximian.com>

        * camel-search-private.c (utf8_get): Remove the stupid warning
        that should never have been there in the first place.

        * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/

        * camel-pgp-context.c (pgp_verify): "

        * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
        append_8bit, rfc2047_encode_word, rfc2184_decode,
        header_decode_param): "

        * camel-mime-part-utils.c (convert_buffer, convert_buffer): "

        * camel-mime-filter-charset.c (reset, complete, filter): "

svn path=/trunk/; revision=14113
2001-10-26 00:37:52 +00:00
e55790f58b Only do the rawtext checks if the part is a text part, otherwise don't
2001-10-21  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Only do the rawtext
	checks if the part is a text part, otherwise don't bother wasting
	cpu cycles.

svn path=/trunk/; revision=13861
2001-10-22 02:08:10 +00:00
ec619f7bfa If a charset isn't specified or claims to be utf-8, check the validity of
2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): If a charset isn't
	specified or claims to be utf-8, check the validity of the text
	and if it's invalid, set the rawtext bit to TRUE. If the charset
	is x-unknown or some other x- charset, always set the rawtext bit
	to TRUE.

svn path=/trunk/; revision=13785
2001-10-19 02:34:13 +00:00
1
a5fa3f992d Removed charset/locale charset lookup and iconv_open/close functions,
2001-10-11    <NotZed@Ximian.com>

        * camel-charset-map.[ch]: Removed charset/locale charset lookup
        and iconv_open/close functions, moved to gal.  Fixed all callers.

svn path=/trunk/; revision=13602
2001-10-11 22:08:20 +00:00
2
65014a74aa Change to camel_charset_iconv_open/close.
2001-10-02    <NotZed@Ximian.com>

        * camel-sasl-digest-md5.c (digest_response):  Change to
        camel_charset_iconv_open/close.

        * camel-pgp-context.c (pgp_verify): Change to
        camel_charset_iconv_open/close.

        * camel-mime-part-utils.c (convert_buffer): Change to
        camel_charset_iconv_open().

        * camel-mime-filter-charset.c
        (camel_mime_filter_charset_new_convert, finalise): Change to
        camel_charset_iconv_open, etc.

        * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
        functions to open/close it.

        * camel-charset-map.c (camel_charset_iconv_open): New function,
        wrap iconv_open, so we can cache ic's.
        (camel_charset_iconv_close): Likewise for close.
        (camel_charset_map_init,shutdown): Init/free iconv cache.

svn path=/trunk/; revision=13361
2001-10-03 00:12:49 +00:00
4
450e955e76 If the type is encoded, get the fallback charset from the message
2001-09-24    <NotZed@Ximian.com>

        * camel-filter-search.c (check_header): If the type is encoded,
        get the fallback charset from the message content-type.

        * camel-mime-part-utils.c (check_html_charset): Dont check for
        charset==null before calling charset_to_iconv.
        (simple_data_wrapper_construct_from_parser): "

        * camel-mime-message.c (process_header): Try use content-type
        charset param as the fallback charset.

        * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
        NULL, return NULL.

        * camel-folder-summary.c (camel_folder_summary_format_address):
        (camel_folder_summary_format_string): Made private again, removed
        #warning about it.  Renamed to s/camel_folder//.
        (summary_format_string): Take default charset param.
        (camel_message_info_new_from_header, message_info_new): Decode
        content-type field to get the charset parameter to use as the
        default charset for decoding strings.

        * camel-search-private.c (camel_search_header_match): Pass NULL as
        the charset, the locale charset is always tried.
        (camel_search_header_match): Supply a default_charset parameter to
        be used with TYPE_ENCODED params.

        * camel-mime-utils.c
        (header_param): get rid of the g_strcasecmp crap.
        (header_set_param): Same here.
        (header_decode_param_list): And here.
        (header_decode_text): Totally rewritten.  30% of its size.  If the
        word is not rfc2047 encoded, always try default_charset if
        supplied, if that fails, try locale charset if it exists, if that
        fails then assume latin1/7 bit ascii.
        (append_8bit): Changed to return FALSE if we can't convert for
        whatever reason, and dont append anything.

        * camel-mime-part.h (struct _CamelMimePart): Move content_type and
        headers out of the 'private' section.

        * camel-mime-part.c (get_headers): Dont do any conversion on the
        header.
        (process_header): Get the content-type charset as the fallback
        charset for decode_string.
        (construct_from_parser): IF we have a content-type header, process
        it before doing anything else, so we have access to a fallback
        charset for invalid headers.

svn path=/trunk/; revision=13096
2001-09-24 19:31:07 +00:00
c9ee98edc7 Convert the charset to the iconv-friendly name.
2001-09-13  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Convert the charset
	to the iconv-friendly name.

	* camel-charset-map.c (camel_charset_to_iconv): Add code to
	convert windows-[cp]#### charsets to their iconv-friendly format
	of cp####.

svn path=/trunk/; revision=12804
2001-09-13 18:36:53 +00:00
4b3b92a763 Reuse the original boundary instead of generating our own.
2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Reuse the
	original boundary instead of generating our own.

svn path=/trunk/; revision=12681
2001-09-07 19:39:34 +00:00
6fbbb872fe re-read the iconv man page, and treat the return value properly. It
2001-08-27  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
        page, and treat the return value properly.  It returns the number
        of non-reversible conversions performed, not the number of output
        characters, sigh.
        (check_html_charset): Changed to just take a buffer of data, and
        not the mime parser.
        (simple_data_wrapper_construct_from_parser): Since we dont need
        the charset till we have all the data, search for the charset
        after we've read the data, if we have html data with no charset in
        the header.
        (simple_data_wrapper_construct_from_parser): Remove the
        seekable_source stuff.

        * Re-apply patches from before.

svn path=/trunk/; revision=12481
2001-08-27 06:33:41 +00:00
7a67b5c2ff Revert Not Zed's previous commits as they apparently can cause serious
2001-08-24  Peter Williams  <peterw@ximian.com>

	* Revert Not Zed's previous commits as they apparently can
	cause serious data loss for POP3 users.

svn path=/trunk/; revision=12461
2001-08-24 22:38:22 +00:00