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, [EMAIL PROTECTED]
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>[EMAIL PROTECTED]</email>
</developer>
</developers>
+ <contributors>
+ <contributor>
+ <name>Yasuoka Masahiko</name>
+ <email>[EMAIL PROTECTED]</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="[EMAIL PROTECTED]">
+ 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]