When submitting, it is checking if the current request is an ajax request. Instead of request header the request parameter identifies it. For the first time the request parameter which is retrieved before the JSF view getting restored, will parse using servers default character encoding (ISO-8859-1) instead of JSF's own default character encoding (UTF-8).
This can be fixed by :
-> Setting ServletRequest#setCharacterEncoding() with UTF-8. Setting the response encoding by ServletResponse#setCharacterEncoding() is by the way unnecessary as it won't be affected by this issue.
@WebFilter("*.xhtml")
public class CharacterEncodingFilter implements Filter {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
chain.doFilter(request, response);
}
}