I'm sending in 2 patches for character encoding problems (client proppatch / server propfind) and one client bugfix. These should solve the problems but be carefull when getting a writer from a servletresponse (set contenttype first) and when transforming a string to a byte array (specify encoding). Greetings Dirk -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 3:41 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Character Encodings was: RE: JDBCDescriptorStore and escaping SQL Yes, I'm using the Slide Client (1.0.9) to do a proppatch. server and client are both on NT4. Found the problem with �, it is the character encoding in WebdavMethod::readRequestContent() requestBody = new String(NodeRevisionContent.readFromStream(req.getInputStream()), getEncodingString(req.getCharacterEncoding())); The req indicated that the encoding is utf-8 but it isn't and therefor the string is truncated. utf-8: <?xml version="1.0" encoding="utf-8" ?><D:propertyupdate xmlns:D="DAV:"><D:set><D:prop><a>a ISO-8859-1: <?xml version="1.0" encoding="utf-8" ?><D:propertyupdate xmlns:D="DAV:"><D:set><D:prop><a>a�a</a></D:prop></D:set></D:propertyupdate> The WebdavClient::sendRequest doesn't send the bytes in utf-8 but uses the default. requestOutputStream.write(query.getBytes()); I tried to change the client to send utf-8 but then there is anoter error. requestOutputStream.write(query.getBytes("utf-8")); the requestBody (on the server) is truncated by 1. <?xml version="1.0" encoding="utf-8" ?> <D:propertyupdate xmlns:D="DAV:"><D:set><D:prop><a>a�a</a> </D:prop> </D:set> </D:propertyupdate org.xml.sax.SAXParseException: Next character must be ">" terminating element "D :propertyupdate". at com.sun.xml.parser.Parser.fatal(Parser.java:2817) I'm looking into that now. Dirk -----Original Message----- From: Remy Maucherat [mailto:[EMAIL PROTECTED]] Sent: Friday, April 20, 2001 8:02 PM To: [EMAIL PROTECTED] Subject: Re: JDBCDescriptorStore and escaping SQL > I've just tied a proppatch and got the following error: > > 20 Apr 2001 11:36:00 - INFO - PROPPATCH (time: 31 ms) URI = > /files/draft-fr.xml > org.xml.sax.SAXParseException: End of entity not allowed; an end tag is > missing. > at com.sun.xml.parser.Parser.fatal(Parser.java:2817) > at com.sun.xml.parser.Parser.fatal(Parser.java:2805) > at com.sun.xml.parser.Parser.content(Parser.java:1553) > at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) > at com.sun.xml.parser.Parser.content(Parser.java:1499) > at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) > at com.sun.xml.parser.Parser.content(Parser.java:1499) > at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) > at com.sun.xml.parser.Parser.content(Parser.java:1499) > at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400) > at com.sun.xml.parser.Parser.parseInternal(Parser.java:492) > at com.sun.xml.parser.Parser.parse(Parser.java:284) > at > com.sun.xml.parser.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:95) > at > org.apache.slide.webdav.method.PropPatchMethod.parseRequest(PropPatchMethod. > java:168) The exception occurs when parsing the request. Are you using the Slide WebDAV client ? Remy
