6957230: CharsetEncoder.maxBytesPerChar() reports 4 for UTF-8; should be 3
authorsherman
Fri, 19 Nov 2010 12:58:32 -0800
changeset 7282 b1f801518f89
parent 7281 f202e1a7a134
child 7283 c26ee71a85b2
6957230: CharsetEncoder.maxBytesPerChar() reports 4 for UTF-8; should be 3 Summary: changged utf-8's CharsetEncoder.maxBytesPerChar to 3 Reviewed-by: alanb
jdk/src/share/classes/sun/nio/cs/UTF_8.java
--- a/jdk/src/share/classes/sun/nio/cs/UTF_8.java	Fri Nov 19 12:55:42 2010 -0800
+++ b/jdk/src/share/classes/sun/nio/cs/UTF_8.java	Fri Nov 19 12:58:32 2010 -0800
@@ -358,7 +358,7 @@
     private static class Encoder extends CharsetEncoder {
 
         private Encoder(Charset cs) {
-            super(cs, 1.1f, 4.0f);
+            super(cs, 1.1f, 3.0f);
         }
 
         public boolean canEncode(char c) {