Sat, 09 Jun 2007
PNG Transparency III.
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
(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
in the image URL with
%252B (0x25 is the ASCII code
of the percent sign). Now back to the (mostly) sane world of UNIX.