On 6/13/06, Fabio Confalonieri <[EMAIL PROTECTED]> wrote:
Klaas-2 wrote: > Are you sending Content-Type headers with appropriate charset > indicated? Is your xml fully-escpaed in your update message?
...no, actually I simply make a URLConnection conn = url.openConnection(); conn.setRequestProperty("ContentType", "text/xml");
That should be 'Content-Type' (not the dash). To specify a charset, set the value to "text/xml; charset=utf-8".
to post del add xml and my XML is embedded in a CData without further escaping... have I to to something else.
Yes. How are you creating your xml? You should be using an XML writer, which should do the necessary escaping of <>'s. I'm unfamiliar with the specifics of java, so I'll leave others to suggest something.
I'm getting data from a MySQL db and I found some problems where in retrieving data from there. I've made some step forword connecting to the db with "characterEncodingutf8" in the jdbc URL, and then converting with:
Is the column collation utf-8 as well? Both the connection and the column collation should be set to utf-8.
new String(mysqlXMLField.getBytes("latin1"));
Why are you converting using the latin1 charset when you opened the connection in utf-8?
But I'm really not into charsets and encodings...
I'm afraid basic knowledge in this area is essential for all developers: http://www.joelonsoftware.com/articles/Unicode.html -MIke