Sat, 09 Jun 2007
PNG Transparency III.
A while ago I wrote about PNG transparency
in MSIE. Today we have discovered another strange bug^H^H^H
behaviour
of MSIE with respect to the AlphaImageLoader
:
We use generated PNG images as a substitute for mathematical formulas.
A common character in those formulas is the plus (+) sign. However,
it seems that AlphaImageLoader
sends this character unescaped
(a plus sign in the URL is to be interpreted as space), so the plus sign
disappears from the resulting image.
I have tried to replace plus sign with %2B
(an ASCII code of this character), but it did not help. Apparently,
AlphaImageLoader
receives the URL in its argument with plus
sign correctly escaped, but it unescapes it and sends the HTTP request
with a bare plus sign.
The solution was then obvious: replace the %2B
strings
in the image URL with %252B
(0x25 is the ASCII code
of the percent sign). Now back to the (mostly) sane world of UNIX.