Unicode in POST body

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unicode in POST body

Emma64
This post has NOT been accepted by the mailing list yet.
I have a RESTlet v2.1.2 method like this:

@Post("json")
public Representation doPost(Representation entity) throws UnsupportedEncodingException {
  Request request = getRequest();
  String entityAsText = request.getEntityAsText();
  logger.info("entityAsText = " + entityAsText + " Üüÿê");

in the Cygwin console it prints:

2015-04-19 22:07:27 INFO  BaseResource:46 - entityAsText = {
"Id":"xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
"Field1":"John?????????",
"Field2":"Johnson??????????"
} ▄³ Û

As you can see the Üüÿê is printed as ▄³ Û. The characters Üüÿê are also in the POST body of SOAP UI. But they're printed as ?????. I have an implemantation which does not use RESTlet where this works. So the settings in SOAP UI are not the problem. (The POST body is in Application/JSON btw.)

How can I extract the unicode chars Üüÿê from the POST body without getting them as ??????? ?
Loading...