ResourceResponseImpl.setCharacterSetEncoding (and setContentType) has problems. If the content type contains a charset (text/xml;charset=utf-8), the setContentType calls setCharacterSetEncoding on "charset=utf-8" vs. utf-8. And setCharacterSetEncoding doesn't adjust accordingly. Also setCharacterSetEncoding using a previous (data member) value to set the responseContext vs. the new one passed in. Altogether it breaks resources that set a contenttype that includes a charset. I have attached a patch file that addresses these problems by altering setCharacterSetEncoding to deal with strings that contain the full charset=xxxx encoding. You might prefer instead to just fix setContentType to do the right thing and require/expect all clients to also do the right thing.