You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/04/28 19:33:08 UTC

svn commit: r1793140 - /tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java

Author: markt
Date: Fri Apr 28 19:33:07 2017
New Revision: 1793140

URL: http://svn.apache.org/viewvc?rev=1793140&view=rev
Log:
Code review / Servlet 4.0
UTF-8 is now the default for URLs

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java?rev=1793140&r1=1793139&r2=1793140&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java Fri Apr 28 19:33:07 2017
@@ -328,7 +328,7 @@ public final class UDecoder {
      * Decode and return the specified URL-encoded String.
      *
      * @param str The url-encoded string
-     * @param enc The encoding to use; if null, ISO-8859-1 is used. If
+     * @param enc The encoding to use; if null, UTF-8 is used. If
      * an unsupported encoding is specified null will be returned
      * @param isQuery Is this a query string being processed
      * @return the decoded string
@@ -351,7 +351,7 @@ public final class UDecoder {
      * Decode and return the specified URL-encoded byte array.
      *
      * @param bytes The url-encoded byte array
-     * @param enc The encoding to use; if null, ISO-8859-1 is used. If
+     * @param enc The encoding to use; if null, UTF-8 is used. If
      * an unsupported encoding is specified null will be returned
      * @param isQuery Is this a query string being processed
      * @return the decoded string
@@ -390,7 +390,7 @@ public final class UDecoder {
                 return null;
             }
         }
-        return new String(bytes, 0, ox, StandardCharsets.ISO_8859_1);
+        return new String(bytes, 0, ox, StandardCharsets.UTF_8);
 
     }
 



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