db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r987978 - in /db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io: DataWriter.java DatabaseIO.java PrettyPrintingXmlWriter.java
Date Mon, 23 Aug 2010 02:27:24 GMT
Author: tomdz
Date: Mon Aug 23 02:27:24 2010
New Revision: 987978

URL: http://svn.apache.org/viewvc?rev=987978&view=rev
Log:
Minor fixes to enforce UTF-8 as the default encoding

Modified:
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataWriter.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DatabaseIO.java
    db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataWriter.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataWriter.java?rev=987978&r1=987977&r2=987978&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataWriter.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DataWriter.java Mon Aug 23 02:27:24
2010
@@ -66,7 +66,7 @@ public class DataWriter extends PrettyPr
      */
     public DataWriter(OutputStream output) throws DataWriterException
     {
-        this(output, null);
+        this(output, "UTF-8");
     }
 
     /**

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DatabaseIO.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DatabaseIO.java?rev=987978&r1=987977&r2=987978&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DatabaseIO.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/DatabaseIO.java Mon Aug 23 02:27:24
2010
@@ -923,7 +923,12 @@ public class DatabaseIO
      */
     public void write(Database model, OutputStream output) throws DdlUtilsXMLException
     {
-        write(model, new OutputStreamWriter(output));
+        PrettyPrintingXmlWriter xmlWriter = new PrettyPrintingXmlWriter(output, "UTF-8");
+
+        xmlWriter.setDefaultNamespace(DDLUTILS_NAMESPACE);
+        xmlWriter.writeDocumentStart();
+        writeDatabaseElement(model, xmlWriter);
+        xmlWriter.writeDocumentEnd();
     }
 
     /**

Modified: db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java?rev=987978&r1=987977&r2=987978&view=diff
==============================================================================
--- db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java (original)
+++ db/ddlutils/trunk/src/main/java/org/apache/ddlutils/io/PrettyPrintingXmlWriter.java Mon
Aug 23 02:27:24 2010
@@ -52,7 +52,7 @@ public class PrettyPrintingXmlWriter
      */
     public PrettyPrintingXmlWriter(OutputStream output) throws DdlUtilsXMLException
     {
-        this(output, null);
+        this(output, "UTF-8");
     }
 
     /**



Mime
View raw message