1830216 Members
1591 Online
109999 Solutions
New Discussion

MIME Corruption

 
Robert Atkinson
Respected Contributor

MIME Corruption

Our support company is looking at this problem, but I wanted to know if anyone else has any clues.

I'm using MIME.EXE to Mime-encode a PDF file.
If I then extract the file back out, I find it's changed.

For instance, the first 4 lines change from this :-

%PDF-1.3
%JetForm PDF Support Version 2.3.000
%EncodingObject=0
%ûüÿ␊

...to this....

%PDF-1.3%JetForm PDF Support Version 2.3.000%EncodingObject=0%ûüÿ

This has been tried on another system using MIME 1.7, 1.8 and 1.9, but works fine.

I've taken their 1.7 and our 1.8, but both fail. I'm now wondering if a patch has upset this utility.

Rob.
7 REPLIES 7
Ian Miller.
Honored Contributor

Re: MIME Corruption

do the file attributes change?
____________________
Purely Personal Opinion
Robert Gezelter
Honored Contributor

Re: MIME Corruption

Rob,

Check the line termination characters and record formats of both files. I suspect that you losing one or the other (i.e., if the file was variable length with implied carriage control, and then was output as a LF-UNIX style file), that would explain the problem.

- Bob Gezelter, http://www.rlgsc.com
Robert Atkinson
Respected Contributor

Re: MIME Corruption

The PDF starts life as Stream. After being extracted, it ends up as Stream_LF.

If I use EXTRACT/FDL= with a Stream FDL, the attributes are then OK, but the file is still corrupt.

My feeling is that it's corrupted when stored.

Rob.
Volker Halle
Honored Contributor

Re: MIME Corruption

Rob,

to compare the actual file contents, consider to use DUMP/BL=COUNT=1 on the original file and the corrupted one.

How is the attached file encoded in the MIME message (MIME> LIST) ?

Volker.
Robert Atkinson
Respected Contributor

Re: MIME Corruption

I use /BINARY, so it's Base64, Octet/Stream.

Rob.
Volker Halle
Honored Contributor

Re: MIME Corruption

Rob,

MIME uses about 13 shareable images (SDA> SHOW PROC/IMA/ID=).

You could compare their versions using anal/ima/select=(ident,build,link_time) sys$library:filename between the working and failing environments. If you believe you've found the 'bad' one, you could try to use a 'good' one in your process by defining a process logical pointing to a 'working' copy of the godd shareable library.

If you copy the MIME-encoded file from the failing to the working environment and extract the .PDF there, you can prove, if your theory (corruption during encoding) is right.

Volker.
Robert Atkinson
Respected Contributor

Re: MIME Corruption

Cheers Volker.

We've identified the shareable images already and I'm checking these against patch kits we've applied to see if I can see anything.

I'm pretty confident that it's the packing, as when I email the MIME file, the attachment is corrupt, which is how I found the problem originally.

Unfortunately, I don't have a system that is working locally, but I might get our support company to send their files over, to test against.

Cheers, Rob.