Fog Creek Software
Discussion Board




decoding mht files into components

Does anybody know how to decode Microsoft MHT archive files into their components (ie html, css, and images)?

christopher baus (www.baus.net)
Monday, May 10, 2004

I believe that an MHT file is just a MIME-multipart file. So you should be able to walk through it with a MIME library and pull out the various pieces.

Chris Tavares
Monday, May 10, 2004

MHT files are actually a quasi-standard called MHTML, which stands for "Mail HTML". They mimic the way that e-mail uses MIME to encode all the pieces of an HTML message (including graphics) to send via e-mail.

As Chris suggested, a MIME parser is a good idea.

Brad Wilson (dotnetguy.techieswithcats.com)
Monday, May 10, 2004

Oh, and it's reached IETF standards track.

http://www.ietf.org/rfc/rfc2557.txt

Brad Wilson (dotnetguy.techieswithcats.com)
Monday, May 10, 2004

you can also use the urlmon mht: (or similar) urlmoniker if you know the name of the part you want (right-click on an image in an mht file or something to get the syntax)

mb
Monday, May 10, 2004

Anybody know why IE doesn't save .swf (flash) files into the mht file - and is it possible to manually add them?

Flasher
Tuesday, May 11, 2004

*  Recent Topics

*  Fog Creek Home