Search code examples
javautf-8character-encodingresteasydiacritics

German umlaut characters in form param resteasy not working


My form

<form accept-charset="UTF-8">

My Html header

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

<meta charset="utf-8">

Tried both and single as well.

My Resteasy filter

 request.setCharacterEncoding("UTF-8");

My Method annotation

@Consumes(MediaType.APPLICATION_FORM_URLENCODED + "; charset=UTF-8")

Alter all this settings , my Resteasy service receiving the german characters wrongly for only form post. json request working fine.

Is there any other setting I have to try?


Solution

  • works fine with filter level settings. I didn't restart the server properly while trying these settings.

    request.setCharacterEncoding("UTF-8");