Java examples for Internationalization:Charset
Listing All Available Unicode to Character Set Converters
import java.nio.charset.Charset; import java.util.Iterator; import java.util.Map; public class Main { public static void main(String[] argv) throws Exception { Map map = Charset.availableCharsets(); Iterator it = map.keySet().iterator(); while (it.hasNext()) { // Get charset name String charsetName = (String) it.next(); System.out.println(charsetName); // Get charset Charset charset = Charset.forName(charsetName); }//www .j a v a 2 s.c o m } }