I had the same problem migrating jaxrs1 (jersey) to resteasy 3.0.17.final.
When uploading form/multipart from a custom client, the client did send a content-type, but no charset and then resteasy assumes "us-ascii" (as per MIME RFC, according to the docs). Funny thing is that if no content-type at all is given, resteasy assumes "text/plain; charset=ISO-8859-1" (following http spec, I assume?).
Their docs propose to solve this using a RestEasy custom interceptor:
https://docs.jboss.org/resteasy/docs/3.0.2.Final/userguide/html/Multipart.html#multipart_overwrite_content_type
But this interceptor is actually deprecated and it advertises to use the jaxrs 2.0 interceptor mechanism.
Long story short, to get it to work in an implementation-independent way, you create this class:
package x.y.z;
import java.io.IOException;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.ext.Provider;
import javax.ws.rs.ext.ReaderInterceptor;
import javax.ws.rs.ext.ReaderInterceptorContext;
@Provider
/**
* If charset not given (form multipart upload), default to UTF-8 and not us-ascii (MIME RFC).
*/
public class RestEasyDefaultCharsetInterceptor implements ReaderInterceptor {
// Using string value instead of constant to limit references to RestEasy (this should be possible to set through web.xml imo)
// private static final String RESTEASY_DEFAULT_CHARSET_PROPERTY = org.jboss.resteasy.plugins.providers.multipart.InputPart.DEFAULT_CHARSET_PROPERTY;
private static final String RESTEASY_DEFAULT_CHARSET_PROPERTY = "resteasy.provider.multipart.inputpart.defaultCharset";
@Override
public Object aroundReadFrom(ReaderInterceptorContext ctx) throws IOException, WebApplicationException {
ctx.setProperty(RESTEASY_DEFAULT_CHARSET_PROPERTY, "UTF-8");
return ctx.proceed();
}
}
Next, add the interceptor to web.xml:
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>
x.y.z.RestEasyDefaultCharsetInterceptor
</param-value>
</context-param>
Now, I don't fully understand the entire mechanism yet, but you should also be able to fix the problem on the client side by specifying the charset parameter to the content-type.