stefano 02/05/19 16:13:59 Modified: src/java/org/apache/cocoon/components/request/multipart MultipartParser.java Log: copying changes to the HEAD Revision Changes Path 1.2 +6 -2 xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/MultipartParser.java Index: MultipartParser.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/multipart/MultipartParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MultipartParser.java 27 Feb 2002 20:21:22 -0000 1.1 +++ MultipartParser.java 19 May 2002 23:13:59 -0000 1.2 @@ -72,7 +72,7 @@ * FilePart: file part * * @author <a href="mailto:[EMAIL PROTECTED]">Jeroen ter Voorde</a> - * @version CVS $Id: MultipartParser.java,v 1.1 2002/02/27 20:21:22 dims Exp $ + * @version CVS $Id: MultipartParser.java,v 1.2 2002/05/19 23:13:59 stefano Exp $ */ public class MultipartParser extends Hashtable { @@ -100,6 +100,8 @@ /** Field maxUploadSize */ private int maxUploadSize; + /** Field characterEncoding */ + private String characterEncoding; /** * Constructor, parses given request * @@ -125,6 +127,8 @@ this.allowOverwrite = allowOverwrite; this.silentlyRename = silentlyRename; this.maxUploadSize = maxUploadSize; + this.characterEncoding = request.getCharacterEncoding(); + if (this.characterEncoding == null) this.characterEncoding = "ISO-8859-1"; if (request.getContentLength() > maxUploadSize) { throw new IOException("Content length exceeds maximum upload size"); @@ -283,7 +287,7 @@ while (in.getState() == TokenStream.STATE_READING) { int read = in.read(buf); - value.append(new String(buf, 0, read)); + value.append(new String(buf, 0, read, this.characterEncoding)); } String field = (String) headers.get("name");
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]