in reply to Re: Help: Mime decoding of a large file
in thread Help: Mime decoding of a large file

Hello Gangabass,

Yes, I am on Windows platform. What is binmode? I did not see any documentation in the Mime package about Binmode. Can you please elaborate.

Thanks.

Ash

  • Comment on Re^2: Help: Mime decoding of a large file

Replies are listed 'Best First'.
Re^3: Help: Mime decoding of a large file
by almut (Canon) on Apr 16, 2009 at 13:01 UTC
Re^3: Help: Mime decoding of a large file
by ww (Archbishop) on Apr 16, 2009 at 13:02 UTC

    Read: perldoc -f binmode

    Oversimplified explanation: Win will puke trying to cope with binary data unless suitably instructed (binmode) that said data includes (most) non-ASCII chars.

      Thanks guys.

      Binmode did fix my encoding issue of a PDF file. However, Binmode does not do anything while decoding it. Decoded file is still corrupted.

      Directory of c:\

      04/13/2009 06:54 PM 7,171,180 O.pdf (Original file))
      04/16/2009 09:08 AM 7,518,867 a.mimed.pdf (Decoded file with binmode)
      04/16/2009 09:00 AM 7,518,867 a.pdf (Decoded file without binmode)

      Ash

        I suspect you're using binmode with FILE as argument. Considering you original post you should use

        binmode STDOUT;