users@jersey.java.net

Re: [Jersey] entities encoding issues in the response

From: Tatu Saloranta <cowtowncoder_at_yahoo.com>
Date: Thu, 15 May 2008 14:22:16 -0700 (PDT)

--- Arul Dhesiaseelan <arul_at_fluxcorp.com> wrote:

> Paul,
>
> I see these 2 errors when I started the REST
> service. My REST service
> invokes a CXF JAX-WS Service.
>
> org.apache.cxf.interceptor.Fault: Could not create
> XMLStreamReader
> (input was of
> encoding UTF-8).
> at
>

This kind of exception often occurs when actual
encoding used is different from encoding xml
declaration claims it is.
For example, if xml content is written using ISO-885-1
 (Latin1) writer, but xml declaration is written to
claim it's UTF-8. Or, http header encoding indicate
different encoding.

Specifically, certain bytes can never occur within
legal UTF-8 byte stream, but are legal for other
encodings.

-+ Tatu +-