Author: remy.maucherat(a)jboss.com
Date: 2009-10-20 09:38:32 -0400 (Tue, 20 Oct 2009)
New Revision: 1213
Modified:
trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
Log:
- Port character replacement fix.
Modified: trunk/java/org/apache/tomcat/util/buf/C2BConverter.java
===================================================================
--- trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2009-10-20 13:12:43 UTC (rev
1212)
+++ trunk/java/org/apache/tomcat/util/buf/C2BConverter.java 2009-10-20 13:38:32 UTC (rev
1213)
@@ -47,10 +47,8 @@
public C2BConverter(String charset)
throws IOException {
try {
- byte[] newReplacement = { (byte)'?' };
encoder = Charset.forName(charset).newEncoder();
- encoder = encoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
- encoder = encoder.replaceWith(newReplacement);
+ encoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
} catch (UnsupportedCharsetException e) {
throw new UnsupportedEncodingException(charset);
}
Show replies by date