I'm passing an arabic text as a payload to doPost servlet. while I'm retrieving the data from request object, I'm getting a Junk value instead of the original one.
Tried with the below code but still no luck. Any inputs would be helpful.
ObjectMapper mapper = new ObjectMapper();String requestBody = getPostBody(request);Map<String, String> requestMap = mapper.readValue(requestBody, Map.class);String fName = requestMap.get("firstName"); // Junk value getting herebyte[] bytes = fName.getBytes(StandardCharsets.UTF_8);String EncodedString = new String(bytes, StandardCharsets.UTF_8); // after encoding also getting the same junk value