Java examples for XML:XML Encoding
charSet Implies Ascii
//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$ } }