jstrachan 2002/11/25 05:43:37 Modified: jelly/src/java/org/apache/commons/jelly/tags/core FileTag.java Log: Applied patch supplied by Alexei Barantsev for issue Jelly-14 http://jira.werken.com/secure/ViewIssue.jspa?key=JELLY-14 Revision Changes Path 1.5 +4 -1 jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/FileTag.java Index: FileTag.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/FileTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FileTag.java 30 Oct 2002 19:16:20 -0000 1.4 +++ FileTag.java 25 Nov 2002 13:43:37 -0000 1.5 @@ -59,6 +59,8 @@ import java.io.FileWriter; import java.io.IOException; import java.io.StringWriter; +import java.io.FileOutputStream; +import java.io.OutputStreamWriter; import java.io.Writer; import org.apache.commons.jelly.JellyException; @@ -90,7 +92,8 @@ //------------------------------------------------------------------------- public void doTag(final XMLOutput output) throws Exception { if ( name != null ) { - Writer writer = new FileWriter(name); + String encoding = (this.encoding != null) ? this.encoding : "UTF-8"; + Writer writer = new OutputStreamWriter( new FileOutputStream( name ), encoding ); writeBody(writer); } else if (var != null) {
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>