I gave the "add the filter and bunch of Spring jars" method a try and it
turned out to be a success! 
Fantastic!

Filter code :
<filter>
<filter-name>characterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

And all the jars from Spring 3.1.0 M distro were copied in the tomcat/lib
folder.

Andre & Cris, a beer in your name tonight.

Cheers! :)




Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> André,
> 
> On 4/8/2011 11:50 AM, André Warnier wrote:
>> Tomislav Brkljačić wrote:
>>> The remote machine gives the wrong "result".
>>>
>>> I wrote on the mailing list of the BPM software, the discussion is still
>>> alive.
>>>
>>> Maybe i could try to force a CharacterEncodingFilter filter on tomcat.
>>> Something like
>>> http://www.onthoo.com/blog/programming/2005/07/characterencodingfilter.html
>>>
>>> this .
>> 
>> Don't do that.  Your problem is with the file *name*, not with the file
>> content.
>> Filters work on the content.
>> I think you could make a real mess of everything by adding a content
>> filter.  I don't think that Tomcat would use it in this case, but if it
>> does, it will filter the whole multi-part body (headers and contents),
>> which is certainly not what you want here.
> 
> If the multipart form-handler uses an InputStream to read the request
> body, it won't matter what the character encoding is, anyway. I suspect
> an InputStream will be used, since that is entirely appropriate in this
> case. On the other hand, setting the character encoding might trigger
> the multipart parsing library to use the preferred encoding to translate
> filename bytes into characters. One can dream.
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk2fMCAACgkQ9CaO5/Lv0PDa8gCfSrZxjxF4vcEcsHkAqFChnYZ4
> nsYAni7LNi0PeGjgGGhxxZadvQOh6QuY
> =VwYO
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/--win-xp-and-win-server-2003---tomcat-utf8-encoding-tp31342723p31359969.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to