| Author |
Best practise for setting character encoding
|
Luke Murphy
Ranch Hand
Joined: May 12, 2010
Posts: 299
|
|
Hi,
We always want UTF-8.
Is it better to set this as a system property passed to the JVM e.g.
-Dfile.encoding=UTF-8
Or is it better to set it programmatically:
System.setProperty("file.encoding", "UTF-8");
And why?
Thanks.
|
 |
Eduardo YaƱez Parareda
Ranch Hand
Joined: Oct 09, 2008
Posts: 92
|
|
|
It depends on your enviroment, I prefer to have it in a configuration file, then set it programmatically. That way you don't depend on Server Applications Admins, and it isn't hardcoded.
|
http://serfj.sourceforge.net - Simplest Ever REST Framework for Java
|
 |
 |
|
|
subject: Best practise for setting character encoding
|
|
|