abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r648051 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
Date Mon, 14 Apr 2008 23:16:59 GMT
Author: jmsnell
Date: Mon Apr 14 16:16:54 2008
New Revision: 648051

URL: http://svn.apache.org/viewvc?rev=648051&view=rev
Log:
https://issues.apache.org/jira/browse/ABDERA-145 -- PrettyWriter uses default system charset
when no specified, but should use UTF-8 or charset of doc.

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java?rev=648051&r1=648050&r2=648051&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
Mon Apr 14 16:16:54 2008
@@ -70,12 +70,8 @@
     WriterOptions options) 
       throws IOException {
     out = getCompressedOutputStream(out, options);
-    String charset = options.getCharset();
-    if (charset != null) {
-      writeTo(base,new OutputStreamWriter(out,charset),options);
-    } else {
-      writeTo(base,new OutputStreamWriter(out),options);
-    }
+    String charset = options.getCharset() != null?options.getCharset():"UTF-8";
+    writeTo(base,new OutputStreamWriter(out,charset),options);
     finishCompressedOutputStream(out, options);
     if (options.getAutoClose()) out.close();
   }



Mime
View raw message