You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2008/04/15 01:16:59 UTC
svn commit: r648051 -
/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/util/PrettyWriter.java
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();
}