Answer the question
In order to leave comments, you need to log in
What is with the encoding on the servlet?
Some data is received from the JSP form to the servlet, in this case I enter the surname "Ivanov" which I write to String, in the debugger I see that string=Ðванов, the page is encoded UTF-8, changing to windows-1251 did not give anything , only the characters have changed, but the text is still illegible ... Tell me what could be the reason and how to fix it?
Answer the question
In order to leave comments, you need to log in
search=new String(search.getBytes("ISO-8859-1"),"utf-8");
All decided by this
https://m.habr.com/ru/post/147843/
Original utf-8, recognized as win-1252.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question