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

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).