charSet Implies Ascii - Java XML

Java examples for XML:XML Encoding

Description

charSet Implies Ascii

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        String charset = "java2s.com";
        System.out.println(charSetImpliesAscii(charset));
    }//from   ww w  .j av  a  2 s.  c  o  m

    public static boolean charSetImpliesAscii(String charset) {
        return charset.equals("ISO-8859-1") || charset.equals("US-ASCII"); //$NON-NLS-1$ //$NON-NLS-2$
    }
}

Related Tutorials