I am trying to convert a string encoded in java in UTF-8 to ISO-8859-1. Say for example, in the string 'âabcd' 'â' is represented in ISO-8859-1 as E2. In UTF-8 it is represented as two bytes. C3 A2 I believe. When I do a getbytes(encoding) and then create a new string with the bytes in ISO-8859-1 encoding, I get a two different chars. Ã¢. Is there any other way to do this so as to keep the character the same i.e. âabcd?
- Java – How to call one constructor from another in Java
- Java – How to read / convert an InputStream into a String in Java
- Java – How to generate random integers within a specific range in Java
- Java – How to convert between ISO-8859-1 and UTF-8 in Java
- Java – How to determine whether an array contains a particular value in Java
- Java – How to convert a String to an int in Java
- Java – How to create a memory leak in Java