Hi,

when i send a chinese character to my REST service, the data i'm getting is
just garbage characters:

this is my REST service:

@PUT
@Path("/project/{projectId}")
public Response updateProject(@PathParam("projectId") final long projectId,
final String xmlData) {
   .....
}

when i send this String: "中文"

printing xmlData results to this: 中æ

I tried using netcat to debug my client and netcat outputs the correct
chinese characters so im sure it a REST service issue.

Is there a way to set character encoding?

I believe i have the correct encoding set, here's CXF logs of the headers:

[05/17/11 16:20:23] DEBUG
org.apache.cxf.transport.http.AbstractHTTPDestination: Request Headers:
{content-type=[application/xml; charset=UTF-8], connection=[Keep-Alive],
Host=[localhost:7001], Content-Length=[39], Content-Type=[application/xml;
charset=UTF-8]}


--
View this message in context: 
http://cxf.547215.n5.nabble.com/jaxrs-unicode-support-tp4404666p4404666.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to