Monday, June 25, 2007

Images in MHT not visible: Issue 2

MHT Issue 2:

The images in MHT files are not displayed in IE. Instead a red cross appears.

Just check whether the URL to the MHT file contains any Spaces, encoded non US-ASCII, Special characters or for that matter any encoded characters. Well, well, well if it does then there is nothing much you can do about it! It is a known Microsoft bug. Microsoft has hot-fix for it. The hotfix description mentions only “Spaces” but the fix works for all encoded characters like spaces, internationalized characters, special characters, etc. The details are here:

Windows XP

SP2: http://support.microsoft.com/kb/891019

SP1: http://support.microsoft.com/kb/895394

Strangely, it is free but not available for direct download. Nor is it a part of any of the Microsoft Patches as there are no patches released since the problem was found! I hope to see it in Windows XP SP3 though. For now, you will have to call up support and they will happily give you the link to it. You will get it almost instantly. I know it is really funny to ask ones client to apply the hot-fix on all the machines. So you might want to consider some alternatives.

Alternative One:

Encode the part of the URL which has the problem causing characters. Personally, I would prefer HEX encoding. You can encode the MHT URL into HEX at the point it is generated. Pass it as a URL/request parameter henceforth. The code which streams out the MHT file will now have to decode it back from HEX and extract the information needed.

Let Me know if you find any other alternatives :P

1 comment:

edriahjacobi said...

The T-Shirt With Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc
T-Shirt micro titanium trim With Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc titanium teeth dog Oxide-Zinc Oxide-Zinc Oxide-Zinc Oxide-Zinc thaitanium Oxide-Zinc citizen eco drive titanium watch Oxide-Zinc titanium razor Oxide-Zinc Oxide-Zinc