Yenya's World

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^Hbehaviour 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.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

About:

Yenya's World: Linux and beyond - Yenya's blog.

Links:

RSS feed

Jan "Yenya" Kasprzak

The main page of this blog

Categories:

Archive:

Blog roll:

alphabetically :-)