0

I have developed Application with Java and Spring MVC. Here, My issue is my application form input field is accepting any language but it is stored it as a different text not exactly as I've typed. English is properly inserted, other than English no other language is not properly inserted. So, In the form input field, I want to accept any language and store that language as it is in database. can anyone please tell me, what changes should I have to do in jsp page. My charset is in utf-8

3
  • Which database are you using? You might have to check the character set used in the database aswell Commented May 31, 2022 at 6:51
  • @leonardseymore I've using PostgreSQL and datatype varchar Commented May 31, 2022 at 7:15
  • Can you check the db charset? stackoverflow.com/questions/6454146/… Commented May 31, 2022 at 7:19

1 Answer 1

0

Something like this maybe?

Map<String, String> queryMap = HttpMessage.parseRequestParameters(request.messageBody);

URLDecoder.decode(queryMap.get("htmlObject"),StandardCharsets.UTF_8.name())
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.