Search code examples
unixwebsphere

How to see the supported Char Set in UNIX JVM


I need to use IBM charset cp1388 on my UNIX JVM. How do I see if my JVM supports this charset?


Solution

  • import java.io.IOException;
    import java.nio.charset.Charset;
    
    public class CharsetList {
    
        public static void main(String[] args) throws IOException {
            for (String key: Charset.availableCharsets().keySet()) {
               System.out.println(key);
            }
        }
    }