You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mathias Nilsson <wi...@gmail.com> on 2011/10/14 23:14:04 UTC
UTF-8 not working
I'm posting this from a Wicket textarea using AjaxButton submit
{"media.command":{"type":"exif","command":{ "media.id" : "2596", "write" :[
{ "name" : "meta.data.caption" , "value" : "σδαφσδφ" }] } }}
The greek char is ???? in the onSubmit(final AjaxRequestTarget target,
Form<?> form) method.
I've added URIEncoding="UTF-8" to the Connector element in Tomcat. Any ideas
why I cant post utf8?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3906237.html
Sent from the Users forum 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
Re: UTF-8 not working
Posted by Mihai Postelnicu <mp...@developmentgateway.org>.
What i did to make sure this works is everything you did +
encodeURIComponent(value)
http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp
Never had any other encoding problems in any browser afterwards.
On Sun 16 Oct 2011 11:56:14 AM EEST, Attila Király wrote:
> Please provide a small quickstart showcasing the problem to get more help
> because based on these information it should work.
>
> Attila
>
> 2011/10/15 Mathias Nilsson<wi...@gmail.com>
>
>> Oh, And I've also tried putting
>> org.springframework.web.filter.CharacterEncodingFilter as the first filter
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3907047.html
>> Sent from the Users forum 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
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: UTF-8 not working
Posted by Attila Király <ki...@gmail.com>.
Please provide a small quickstart showcasing the problem to get more help
because based on these information it should work.
Attila
2011/10/15 Mathias Nilsson <wi...@gmail.com>
> Oh, And I've also tried putting
> org.springframework.web.filter.CharacterEncodingFilter as the first filter
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3907047.html
> Sent from the Users forum 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
>
>
Re: UTF-8 not working
Posted by Mathias Nilsson <wi...@gmail.com>.
Oh, And I've also tried putting
org.springframework.web.filter.CharacterEncodingFilter as the first filter
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3907047.html
Sent from the Users forum 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
Re: UTF-8 not working
Posted by Mathias Nilsson <wi...@gmail.com>.
This is my web.xml. Still does not work
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="media-server" version="2.5">
<display-name>media-server</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.xml</param-value>
</context-param>
<context-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>media-server</param-value>
</context-param>
<filter>
<filter-name>encodingFilter</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>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<filter-class>
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>wicket.media</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>se.fototext.media.server.web.application.MediaApplication</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>wicket.media</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3907026.html
Sent from the Users forum 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
Re: UTF-8 not working
Posted by Attila Király <ki...@gmail.com>.
You have to configure a filter (write one or reuse existing ones like
http://static.springsource.org/spring/docs/3.1.0.RC1/javadoc-api/org/springframework/web/filter/CharacterEncodingFilter.html)
to call request.setCharacterEncoding("UTF-8") before wicket gets the
request. This is not needed with wicket 1.5.
Attila
2011/10/14 Mathias Nilsson <wi...@gmail.com>
> Sorry. Forgot to say wicket version 1.4.18
>
> getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
> getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
>
> set in init
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3906254.html
> Sent from the Users forum 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
>
>
Re: UTF-8 not working
Posted by Mathias Nilsson <wi...@gmail.com>.
Sorry. Forgot to say wicket version 1.4.18
getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
set in init
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/UTF-8-not-working-tp3906237p3906254.html
Sent from the Users forum 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