A database URL to specify the database to connect to, if permitted by
the module settings. If omitted then the default database will be
used.
The database URL is on this format:
driver://[username[:password]@]host[:port][/database]
where driver is the database protocol, e.g. "odbc",
"mysql", "oracle", "postgres", etc.
For compatibility this can also be a database name as given to the
"db" attribute.
Use the specified charset for the sent SQL statement and returned
text values.
This will cause all SQL queries to be encoded with this charset.
It will also normally cause all string results to be decoded with
this charset, but there are exceptions as explained later. If the
database connection supports it, the connection will be configured to
use this charset too (at least MySQL 4.1 and later has such
support).
In many cases, it is difficult for the SQL interface to tell text
and binary data apart in results. That is a problem since a text
string should be decoded according to the charset while a binary
octet string must not be decoded.
If the connection supports it, using the special value
unicode as charset is guaranteed to handle both text and
binary result strings correctly so you don't have to worry about it.
In that case you can assume the SQL query and text results covers the
full Unicode range, and the connection will handle the charset issues
internally. This is known to be supported with MySQL 4.1 and later.
An RXML run error is thrown if it isn't supported.
Otherwise, all string values are assumed to be text and are
therefore decoded using the given charset. You can turn it off for
specific columns through the "binary-result" attribute.
If you use none as charset in this attribute then the
charset handling described here is disabled for this query. That is
useful to override a charset in the "Default charset" module
setting.
The charset specification in this attribute can optionally be a
list like this:
charset="recode-charset,
connection-charset"
In this form, the recode-charset is used by Roxen to recode
the query and results, and connection-charset is sent to the
database driver to use for the connection. This is useful if the
database server uses nonstandard names for its character sets. E.g.
MySQL spells cp1252 as "latin1" (which is the
closest you get to iso-8859-1 there), so to use that you'd
say "cp1252,latin1" in this attribute. This list form is
not applicable for the unicode case.
Compatibility note: In Roxen 4.5 this attribute only
configured the charset for the connection; it didn't do any
conversion of the query nor the results. This behavior still remains
if the compatibility level is 4.5 or lower. You can also achieve the
same effect by specifying "none,whatever" as
charset.