You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Java Programmer <jp...@gmail.com> on 2010/11/26 10:08:10 UTC

Form sending encoding problem 1.5-M3

Hello,
I have migrated with a small project to Wicket 1.5-M3, and most of
things work fine, but I have one problem with encodings. All my pages
are UTF-8, the messages from properties, and database data is fetched
fine, But problem appear when I try to send data from form, and it
contains some country specific letters. The request isn't processed as
it usually did for me in 1.4.9 version. I looked at the headers and
see:

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
Content-Type: multipart/form-data;
boundary=---------------------------974127529778
Content-Length: 1459

it seems that Wicket use ISO-8859-2 as it's POST data encoding, even
if I set encodings in markup to UTF-8 (which is prefered form me now).
I have google for this issue but can't find solutions but this one:
https://cwiki.apache.org/WICKET/how-to-change-the-character-encoding.html

So far I tried:
1) in html: <?xml version="1.0" encoding="utf-8"?> and <meta
http-equiv="Content-Type" content="text/html; charset=UTF-8" />
2) in Application configuration:
getMarkupSettings().setDefaultMarkupEncoding("UTF-8");
getRequestCycleSettings().setResponseRequestEncoding("UTF-8");
3) in Maven:
<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-compiler-plugin</artifactId>
 <configuration>
  <source>1.6</source>
  <target>1.6</target>
  <encoding>UTF-8</encoding>
 </configuration>
</plugin>
in Jetty plugin:
<systemProperties>
 <systemProperty>
  <name>file.encoding</name>
  <value>UTF-8</value>
 </systemProperty>
</systemProperties>

I look at my earlier projects in 1.4.9, and there was no such problems
with encodings, so I guess something was added to 1.5. If someone can
help with that I would be greatful, for now ideal solution for me
would be even narrow encodings used by Wicket to UTF-8.
-- 
Best regards,
Adrian

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


Re: Form sending encoding problem 1.5-M3

Posted by Java Programmer <jp...@gmail.com>.
Unfortunately it wouldn't help - in source:
<form wicket:id="addEvent" accept-charset="UTF-8" id="addEvent9"
method="post" action="../wicket/page?2-2.IFormSubmitListener-addEvent"
enctype="multipart/form-data">
but still characters are messed up.

-- 
Best regards,
Adrian

On Fri, Nov 26, 2010 at 10:57 AM, Martin Grigorov <mg...@apache.org> wrote:
> try with <form accept-charset="UTF-8">
>
> http://www.w3schools.com/tags/att_form_accept_charset.asp
>
> On Fri, Nov 26, 2010 at 10:40 AM, Java Programmer <jp...@gmail.com>wrote:
>
>> Hello again,
>> I have checked one more thing - I have removed from code and html
>> MultiFileUploadField, so the POST request wasn't multipart, and
>> everything was fine this time (UTF-8 data send from form).
>> Any ideas, what's wrong? A bug in multipart forms processing?
>>
>> --
>> Thanks in advance,
>> Adrian
>>
>> ---------------------------------------------------------------------
>> 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: Form sending encoding problem 1.5-M3

Posted by Martin Grigorov <mg...@apache.org>.
try with <form accept-charset="UTF-8">

http://www.w3schools.com/tags/att_form_accept_charset.asp

On Fri, Nov 26, 2010 at 10:40 AM, Java Programmer <jp...@gmail.com>wrote:

> Hello again,
> I have checked one more thing - I have removed from code and html
> MultiFileUploadField, so the POST request wasn't multipart, and
> everything was fine this time (UTF-8 data send from form).
> Any ideas, what's wrong? A bug in multipart forms processing?
>
> --
> Thanks in advance,
> Adrian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Form sending encoding problem 1.5-M3

Posted by Java Programmer <jp...@gmail.com>.
Hello again,
I have checked one more thing - I have removed from code and html
MultiFileUploadField, so the POST request wasn't multipart, and
everything was fine this time (UTF-8 data send from form).
Any ideas, what's wrong? A bug in multipart forms processing?

-- 
Thanks in advance,
Adrian

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