I am getting this string via a message broker (Stomp):
João
and that’s how it suposed to be:
João
Is there a way to revert this in Java?!
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m having trouble determining how this could be a data (encoding) conversion problem. Is it possible the data is just bad?
If the data isn’t bad, then we have to assume you are misinterpreting the encoding. We don’t know the original encoding and unless you’re doing something different, the default encoding for Java is UTF-16. I don’t see how
Joãoencoded in any common encoding could be interpreted asJoãoin UTF-16Just to be sure, I whipped this python script up with no match found. I’m not entirely sure it covers all encodings or I’m not missing a corner case, FWIW.