You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ssanchez <so...@gmail.com> on 2008/11/04 17:09:04 UTC

Problem using UTF-8 and QueryStringUrlCodingStrategy

Hello,

I'm trying to use UTF-8 as the default encoding in a web application using
Wicket and Spring. Although everything seems to be working properly, I'm
facing a problem when dealing with a page mounted using the
QueryStringUrlCodingStrategy.

The application configuration

* The html pages include the meta tag

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

* getRequestCycleSettings().setResponseRequestEncoding() returns UTF-8 as
the encoding

* I've configured the Spring CharacterEncodingFilter as the first filter in
the web.xml

 <filter>
    <filter-name>charsetFilter</filter-name>
    <filter-class>
        org.springframework.web.filter.CharacterEncodingFilter
    </filter-class>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>UTF-8</param-value>
    </init-param>    
 </filter> 
 <filter-mapping>
  <filter-name>charsetFilter</filter-name>
  <url-pattern>/*</url-pattern>
 </filter-mapping> 

The problem

If I have a page mounted as:
  mount(new QueryStringUrlCodingStrategy("/search/feed", 
                SearchFeedPage.class));

and, in another page, a link to that one:
          BookmarkablePageLink("feed", SearchFeedPage.class, 
                theParameters);
where theParameters include, for example, a parameter with the value "día" 

The link is correctly encoded (using UTF-8) but, once it is clicked, it is
not correctly decoded. 

Is there something missed in the configuration? is it a bug? If, instead of
using QueryStringUrlCodingStrategy I mount the page as:
  mountBookmarkablePage("/search/feed", SearchFeedPage.class); everything
works correctly

Thanks




-- 
View this message in context: http://www.nabble.com/Problem-using-UTF-8-and-QueryStringUrlCodingStrategy-tp20325317p20325317.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org