caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Netmime.readmessage and Netmime.writemessage - unexpected results
@ 2005-06-17 13:35 Johann Spies
  2005-06-17 13:47 ` [Caml-list] " Johann Spies
  0 siblings, 1 reply; 2+ messages in thread
From: Johann Spies @ 2005-06-17 13:35 UTC (permalink / raw)
  To: caml-list


 
When I use the following code:

let readmessage () = Netmime.read_mime_message (new
    Netstream.input_stream (new Netchannels.input_channel stdin));;

let writemessage mesg = Netmime.write_mime_message  (new   
    Netchannels.output_channel stdout) mesg

let _ = (*handle ( readmessage () )*)
  let f = readmessage () in
    writemessage f


and pipe a short, multipart message through it using:

$ cat multipart | disclaimer > multipart2

a "diff -y multipart multipart2" shows that an extra
"
^I^I^I^I^I^I^I^I" (tabs) was added on to every line.

I have expected an unaltered message. 

There was also some wording removed from the preface part of the
message and from the epilogue.

I have attached the original and filtered messages (multipart and
multipart2) to illustrate the problem.

When piping a simple message (not multipart) through this code
"^M^I^I^I^I^I^I^I^I" was added to the headers only.

How can I avoid this behaviour?

Regards
Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Many are the afflictions of the righteous; but the
      LORD delivereth him out of them all."       
                                   Psalms 34:19


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Netmime.readmessage and Netmime.writemessage - unexpected results
  2005-06-17 13:35 Netmime.readmessage and Netmime.writemessage - unexpected results Johann Spies
@ 2005-06-17 13:47 ` Johann Spies
  0 siblings, 0 replies; 2+ messages in thread
From: Johann Spies @ 2005-06-17 13:47 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

On Fri, Jun 17, 2005 at 03:35:40PM +0200, Johann Spies wrote:
Sorry, I forgot to add the two examples.

Here they are.


Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Many are the afflictions of the righteous; but the
      LORD delivereth him out of them all."       
                                   Psalms 34:19

[-- Attachment #2: multipart --]
[-- Type: text/plain, Size: 517 bytes --]

Date: Tue, 26 Jan 1999 23:17:34 +0900
From: aamine@dp.u-netsurf.ne.jp
To: ruby-list@netlab.co.jp
Mime-Version: 1.0
Content-Type: multipart/mixed;
  boundary="Multipart_Tue_Jan_26_23:14:41_1999-1"
Content-Transfer-Encoding: 7bit

this is preamble

--Multipart_Tue_Jan_26_23:14:41_1999-1
Content-Type: text/plain; charset=iso-2022-jp

this is multi part body 1

--Multipart_Tue_Jan_26_23:14:41_1999-1
Content-Type: text/plain; charset=iso-2022-jp

multi part body, 2

--Multipart_Tue_Jan_26_23:14:41_1999-1--

epilogue

[-- Attachment #3: multipart2 --]
[-- Type: text/plain, Size: 489 bytes --]

Date: Tue, 26 Jan 1999 23:17:34 +0900
From: aamine@dp.u-netsurf.ne.jp
To: ruby-list@netlab.co.jp
Mime-Version: 1.0
Content-Type: multipart/mixed;
  boundary="Multipart_Tue_Jan_26_23:14:41_1999-1"
Content-Transfer-Encoding: 7bit

--Multipart_Tue_Jan_26_23:14:41_1999-1
Content-Type: text/plain; charset=iso-2022-jp

this is multi part body 1

--Multipart_Tue_Jan_26_23:14:41_1999-1
Content-Type: text/plain; charset=iso-2022-jp

multi part body, 2

--Multipart_Tue_Jan_26_23:14:41_1999-1--

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-17 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-17 13:35 Netmime.readmessage and Netmime.writemessage - unexpected results Johann Spies
2005-06-17 13:47 ` [Caml-list] " Johann Spies

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).