Here you can find the source of getFileEncodingCharset()
public static Charset getFileEncodingCharset()
//package com.java2s; /* This code is part of Freenet. It is distributed under the GNU General * Public License, version 2 (or at your option any later version). See * http://www.gnu.org/ for further details of the GPL. */ import java.nio.charset.Charset; public class Main { /**//from ww w. java 2 s. co m * Returns the Charset which is equal to the "file.encoding" property. * This property is set to the users configured system language on windows for example. * * If any error occurs, the default Charset is returned. Therefore this function should never throw. */ public static Charset getFileEncodingCharset() { try { return Charset.forName(System.getProperty("file.encoding")); } catch (Throwable t) { return Charset.defaultCharset(); } } }