click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1002079 - in /click/trunk/click: documentation/docs/roadmap-changes.html framework/src/org/apache/click/util/ClickUtils.java
Date Tue, 28 Sep 2010 09:51:32 GMT
Author: sabob
Date: Tue Sep 28 09:51:32 2010
New Revision: 1002079

URL: http://svn.apache.org/viewvc?rev=1002079&view=rev
Log:
set UTF-8 as  default encoding. CLK-720

Modified:
    click/trunk/click/documentation/docs/roadmap-changes.html
    click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java

Modified: click/trunk/click/documentation/docs/roadmap-changes.html
URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/roadmap-changes.html?rev=1002079&r1=1002078&r2=1002079&view=diff
==============================================================================
--- click/trunk/click/documentation/docs/roadmap-changes.html (original)
+++ click/trunk/click/documentation/docs/roadmap-changes.html Tue Sep 28 09:51:32 2010
@@ -211,6 +211,11 @@ service.
               Added method, ClickUtils.escape(String), to escape XML characters.
           </li>
           <li class="change">
+              Improved ClickUtils.encodeUrl to default to "UTF-8" if no request
+              character encoding is available
+              [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-720">CLK-720</a>].
+          </li>
+          <li class="change">
               Improved page header support allowing headers to be set from page constructor
               [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-711">CLK-711</a>].
           </li>

Modified: click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java?rev=1002079&r1=1002078&r2=1002079&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java (original)
+++ click/trunk/click/framework/src/org/apache/click/util/ClickUtils.java Tue Sep 28 09:51:32
2010
@@ -1981,7 +1981,8 @@ public class ClickUtils {
 
     /**
      * Return an encoded URL value for the given object using the context
-     * request character encoding.
+     * request character encoding or "UTF-8" if the request character encoding
+     * is not specified.
      * <p/>
      * For example <tt>(http://host?name=value with spaces)</tt> will become
      * <tt>(http://host?name=value%20with%20spaces)</tt>.
@@ -2005,7 +2006,7 @@ public class ClickUtils {
 
         try {
             if (charset == null) {
-                return URLEncoder.encode(object.toString());
+                return URLEncoder.encode(object.toString(), "UTF-8");
 
             } else {
                 return URLEncoder.encode(object.toString(), charset);



Mime
View raw message