I have a problem with the accent character in different platforms.
When I log this in my machine under fedora (where default charset is UTF-8) it is printing correvtly as Sacré Coeur.
But when i update to another server that is running on RedHat (where default charset is ISO-8859-1), it is printing as
Sacré Coeur.
I want to log it in RedHat server as same as in my my Fedora machine. How can I do this?
My Workout :
- I tried to changes the System.setProperty("file.encoding", "ISO-8859-1"); in local with the purpouse of doing the reverse version System.setProperty("file.encoding", "UTF-8"); in the RedHat Server, if it change the way of logging in the local. But nothing changed.
- I noticed there are couple of threads regarding the accent character but nithing answers me. That's why I asked a new question.
I tried this one as well but not working.
System.setProperty("file.encoding","ISO-8859-1"); Field charset =Charset.class.getDeclaredField("defaultCharset"); charset.setAccessible(true); charset.set(null,null);
- But I didn't try to set the charset at the JVM start. If it will works please explain me how can I do it?