On input path, ap_xml_parse_input() handles converting xml to native
charset (at least in 2.2).  On output, there is no provision for
converting xml in responses.

Some choices:

(a) convert right in DAV before calling ap_fXXX() APIs
(b) have DAV implement a filter that converts xml from native to UTF-8
(or whatever the xml says the charset is in); add the filter
automatically within DAV when it generates an xml response; it would
be prudent for mod_charset_lite to be aware of this filter so that it
won't touch the body where it is added
(c) have mod_charset_lite implement a special filter for this purpose;
perhaps it uses the existing logic but the name of the filter sets the
proper configuration; DAV would add this filter implicitly when it
generates an xml response; user simply loads mod_charset_lite on
non-ASCII machine and no further configuration is needed to get DAV
xml translatable
(d) ??? (some solutions in mod_charset_lite which require user to do
special mod_charset_lite configuration, such as to indicate that dav
xml is translated one way and actual content is potentially translated
a different way, or not translated at all)

(c) looks reasonable to me; they agree on filter name
(mod_charset_lite.h) and it is presumed that it means to translate
from the codepage of compliled in strings (such as the string
DAV_XML_HEADER in mod_dav.h) to UTF-8

Thoughts?

Reply via email to