You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by jo...@apache.org on 2006/10/10 10:08:42 UTC
svn commit: r454655 - in /webservices/commons/trunk/modules/util: pom.xml
src/changes/changes.xml
src/main/java/org/apache/ws/commons/serialize/CharSetXMLWriter.java
Author: jochen
Date: Tue Oct 10 01:08:42 2006
New Revision: 454655
URL: http://svn.apache.org/viewvc?view=rev&rev=454655
Log:
Fixed the completely broken CharSetXMLWriter.
Submitted-By: Yasuoka Masahiko, yasuoka@iij.ad.jp
Modified:
webservices/commons/trunk/modules/util/pom.xml
webservices/commons/trunk/modules/util/src/changes/changes.xml
webservices/commons/trunk/modules/util/src/main/java/org/apache/ws/commons/serialize/CharSetXMLWriter.java
Modified: webservices/commons/trunk/modules/util/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/util/pom.xml?view=diff&rev=454655&r1=454654&r2=454655
==============================================================================
--- webservices/commons/trunk/modules/util/pom.xml (original)
+++ webservices/commons/trunk/modules/util/pom.xml Tue Oct 10 01:08:42 2006
@@ -36,6 +36,12 @@
<email>jochen.wiedmann@gmail.com</email>
</developer>
</developers>
+ <contributors>
+ <contributor>
+ <name>Yasuoka Masahiko</name>
+ <email>yasuoka@iij.ad.jp</email>
+ </contributor>
+ </contributors>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
Modified: webservices/commons/trunk/modules/util/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/util/src/changes/changes.xml?view=diff&rev=454655&r1=454654&r2=454655
==============================================================================
--- webservices/commons/trunk/modules/util/src/changes/changes.xml (original)
+++ webservices/commons/trunk/modules/util/src/changes/changes.xml Tue Oct 10 01:08:42 2006
@@ -7,6 +7,10 @@
<action dev="jochen" type="fix">
A "newDecoder" method in the Base64 class wasn't static.
</action>
+ <action dev="jochen" type="fix" due-to="Yasuoka Masahiko"
+ due-to-email="yasuoka@iij.ad.jp">
+ Fixed the completely broken CharSetXMLWriter.
+ </action>
</release>
<release version="1.0.1" date="2006-06-19">
<action dev="jochen" type="fix">
Modified: webservices/commons/trunk/modules/util/src/main/java/org/apache/ws/commons/serialize/CharSetXMLWriter.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/util/src/main/java/org/apache/ws/commons/serialize/CharSetXMLWriter.java?view=diff&rev=454655&r1=454654&r2=454655
==============================================================================
--- webservices/commons/trunk/modules/util/src/main/java/org/apache/ws/commons/serialize/CharSetXMLWriter.java (original)
+++ webservices/commons/trunk/modules/util/src/main/java/org/apache/ws/commons/serialize/CharSetXMLWriter.java Tue Oct 10 01:08:42 2006
@@ -29,13 +29,18 @@
private CharsetEncoder charsetEncoder;
public void startDocument() throws SAXException {
- Charset charSet = Charset.forName(getEncoding());
+ String enc = getEncoding();
+ if (enc == null) {
+ enc = "UTF-8";
+ }
+ Charset charSet = Charset.forName(enc);
if (charSet.canEncode()) {
charsetEncoder = charSet.newEncoder();
}
+ super.startDocument();
}
public boolean canEncode(char c) {
- return (charsetEncoder == null) ? false : charsetEncoder.canEncode(c);
+ return (charsetEncoder == null) ? super.canEncode(c) : charsetEncoder.canEncode(c);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org