httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Fosdick <>
Subject How do I handle Unicode inside XML request bits?
Date Mon, 12 Sep 2005 00:13:54 GMT
I'm not sure if this should be here or the modules list, but here goes anyway...

I'm working on a module for 2.0.x (mod_dav_userdir) and I'm using litmus for testing. In one
of the tests where it sets a dead property on a resource it sends some XML with a unicode
character in it, like so:

[<?xml version="1.0" encoding="utf-8" ?><propertyupdate xmlns='DAV:'><set><prop><high-unicode

mod_dav_fs runs the XML through apr_xml_quote_elem() and apr_xml_to_text() before storing
it in a database. So, naturally, I tried doing the same. But when I echo the text to the log
I get gibberish and when its stored in MySQL it shows as '????'. Reading the text straight
out of the provided apr_xml_elem also returns gibberish. The litmus test fails with the message:

18. propget............... FAIL (Property {}high-unicode had
value ????, expected 𐀀)

Apparently the original text ("&#65536") from the request is getting parsed into something
that isn't useable. Is there some way to just read the orginal text and store that? What's
the proper way to handle unicode characters?


View raw message