How do I set a default character encoding for file I/O operations, JDBC requests and so on?
Location: http://www.jguru.com/faq/view.jsp?EID=78088 Created: Jun 16, 2000 Modified: 2001-08-18 17:31:58.349 Author: Sandip Chitale (http://www.jguru.com/guru/viewbio.jsp?EID=14537) Question originally posed by Dmitry Popov (http://www.jguru.com/guru/viewbio.jsp?EID=45003 The default encoding used by locale/encoding sensitive API in the Java libraries is determined by the System property “file.encoding”. This system property is initialized by the JVM startup code after querying the underlying native operating system. For example on my English USA NT box it is initialized to: Cp1252 It is generally recommended that you do not modify it. However if you know what you are doing you could override the system property either on the command line using the – java -Dfile.encoding=… syntax or programmatically at startup. Here is the reference URL for supported encodings – • http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html You may also find Sun’s online tutorial helpf
Location: http://www.jguru.com/faq/view.jsp?EID=78088 Created: Jun 16, 2000 Modified: 2001-08-18 17:31:58.349 Author: Sandip Chitale (http://www.jguru.com/guru/viewbio.jsp?EID=14537) Question originally posed by Dmitry Popov (http://www.jguru.com/guru/viewbio.jsp?EID=45003 The default encoding used by locale/encoding sensitive API in the Java libraries is determined by the System property “file.encoding”. This system property is initialized by the JVM startup code after querying the underlying native operating system. For example on my English USA NT box it is initialized to: Cp1252 It is generally recommended that you do not modify it. However if you know what you are doing you could override the system property either on the command line using the – java -Dfile.encoding=… syntax or programmatically at startup.