Does Java 1.7 use different character encodings?
We migrated our application from Java 1.6 to Java 1.7 We recompile the code using java 1.7 and receive an error at compile time due to a character (Ó)
Is java 1.7 related to characters? Our application does a lot of processing on the incoming files and then loads them into the database, and I want to ensure that when we upgrade to Java 1.7, reading files from Java and writing to the database of this content will not lead to some strange character conversion
Do I need to care when upgrading to 1.7? If so, how do I get the same code as Java 1.6?
Solution
The error occurs because you have told the java compiler that your source code is UTF-8 encoded, but it still contains some iso-8859-1 extended characters I recently had to fix similar errors in the code base migrated from 1.5 to 1.6 I believe that Java 7 is much more strict with UTF - 8 coding than previous versions, and will issue errors that the previous wrong coding is accepted by default
You need to ensure that your source code is "Unicode clean", that is, you must replace any extended iso-8859-1 characters with Unicode equivalents