When I upload a file to the server, everything is fine. But if the name of the file contains cyrillic characters, on the server that filename appears with question marks.
I don't set any character encoding when I send request to the server.
I know that if you don't put any character encoding in the header when you make request, the default character encoding that RestEasy puts is us-ascii. I tried a couple of ways to change it:
- With new String(filename.getBytes("US-ASCII"), "UTF-8") - didn't work;
- I wrote ContainerRequestFilter, where I changed the ContentType of this request and I added charset=UTF-8 to the ContentType. It is set correctly but still doesn't work.
Could you please help! I would be very thankful!
Thanks!
Also posted on jboss.org forum
Don't change the Content-Type but use a
ContainerRequestFilter
to overwrite the default charset property:Maybe you should check if there is a encoding provided and overwrite only if not.