users@jersey.java.net

Re: [Jersey] code for UTF-8 issue

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Thu, 18 Nov 2010 13:21:00 +0100

Hi Abe,

Attached is a simple echo application.
Posting JSON data containing French text works fine with me there.

See the MainTest, or try to run the thing with mvn clean compile exec:java
and make the following request using curl:

curl -XPOST -HContent-type:application/json -d"{\"content\":\"Connaître
Genève\"}" http://localhost:9998/myresource

Does the above work for you?

Thanks,

~Jakub

On 11/15/2010 08:22 AM, Abe Zafar wrote:
> The server method is as follows:
>
> @POST
> @Path("/add")
> @Consumes("application/json")
> @Produces("application/json")
> public BooleanWrapper add(Item item,
> @Context HttpServletRequest request,
> @Context HttpServletResponse response) {
>
> item.frenchText has french accented words.