tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1140204 - /tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
Date Mon, 27 Jun 2011 15:19:22 GMT
Author: markt
Date: Mon Jun 27 15:19:22 2011
New Revision: 1140204

URL: http://svn.apache.org/viewvc?rev=1140204&view=rev
Log:
Need to include aliases in charset cache

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=1140204&r1=1140203&r2=1140204&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Mon Jun 27 15:19:22 2011
@@ -55,8 +55,11 @@ public class B2CConverter {
     static {
         for (Entry<String,Charset> entry :
                 Charset.availableCharsets().entrySet()) {
-            encodingToCharsetCache.put(entry.getKey().toLowerCase(),
-                    entry.getValue());
+            Charset charset = entry.getValue(); 
+            encodingToCharsetCache.put(entry.getKey().toLowerCase(), charset);
+            for (String alias : charset.aliases()) {
+                encodingToCharsetCache.put(alias, charset);
+            }
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message