I might be missing something here but shouldn't there be a :none encoding when
you output the o.img value? Like &o.img:none;?
----- Original Message ----
From: Stephen R. van den Berg <<srb[at]cuci.nl>>
Sent: Tuesday, April 7, 2009 3:43:44 PM
Subject: Encoding?, <value> incantation?
I'm trying to retrieve the binary content from an SQL database and return
it to the browser unharmed (for image display).
On older Roxen versions (before sep 2008 or so) this worked fine, but alas,
the bleeding edge 5.0 does something strange with the character encoding,
it seems. It converts it to UTF-8 or something prior to sending:
This is what I'm trying:
<emit source=sql scope=o query="SELECT
(SELECT mimetype FROM objtype ot
LIMIT 1) AS mimetype"
><header name="Content-Type" value="&_.mimetype;"
Anybody know the magic <value> incantation to convince Roxen *not* to
perform any character conversions on the output prior to transmission?
I.e. I already verified that the database contains a real 2010 characters
binary, at RXML level the variable confirms that it contains that
number of characters. However, as soon is it gets sent to the browser
it ends up being around 3045 bytes (most likely an UTF-8 output conversion).
Stephen R. van den Berg.
"If I had to live my life again, I'd make the same mistakes, only sooner."