Here you can find the source of getCanonicalCharset(String charset)
public static String getCanonicalCharset(String charset)
//package com.java2s; import java.nio.charset.Charset; public class Main { public static String getCanonicalCharset(String charset) { return Charset.forName(charset).name(); }//from ww w . j a v a 2s. c o m }