[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

encoding problem on Jetty consumer side

I have a route defined from a Jetty endpoint. I am trying to read a path
parameter and print its contents:

                .process(exchange -> {
                    String path = (String)
                    System.out.println("got path: " + path);

I am calling this via curl on Windows passing Hebrew characters:

curl http://localhost:8099/my-service -X post -d "path=שדגכ"

The output I am getting is:

I tried
curl http://localhost:8099/my-service -X post -H "Content-Type: text/html;
charset=UTF-8" -d "path:שדגכ"
In this case the path is not added as a Header at all so the code above
produces null. I am able to see the path in the debug window
using exchange.getIn().getBody(String.class) but then i see that the result
is again path:????

Any idea how I can get set a utf-8 encoding properly on Camel side and on
curl side?