Reputation: 1
I have a error with my file. That is, all the characters are like "Giá»âºi tÃÂnh".
I want to use Java to write a program that convert those characters to normal ones. I have tried to convert them to bytes and then convert again to String but it remained the same.
Upvotes: 0
Views: 131
Reputation: 46452
You need to know the encoding of the file in order to do this. Java internally represents all Strings as UTF-16; in order to fix the issue, you need to know the encoding of the file, and use that encoding when reading the file: http://goo.gl/PoBgo (Java API Docs)
Upvotes: 1