Java tutorial
import java.nio.charset.Charset; import java.util.Iterator; import java.util.Map; public class MainClass { public static void main(String[] args) { Map charsets = Charset.availableCharsets(); Iterator iterator = charsets.keySet().iterator(); while (iterator.hasNext()) { System.out.println(iterator.next()); } } }