// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.UnsupportedEncodingException;

public class IsoDif {
    public static void main(String[] args) throws UnsupportedEncodingException {
        byte[] b = new byte[1];
        for(int i = 0; i < 256; i++) {
            b[0] = (byte)i;
            String s1 = new String(b, "ISO-8859-1");
            String s2 = new String(b, "cp1252");
            String s3 = new String(b, "ISO-8859-15");
            if(!s1.equals(s2)) {
                System.out.println(i + " : " + (int)s1.charAt(0) + " (ISO-8859-1) " + (int)s2.charAt(0) + " (cp1252)");
            }
            if(!s1.equals(s3)) {
                System.out.println(i + " : " + (int)s1.charAt(0) + " (ISO-8859-1) " + (int)s3.charAt(0) + " (ISO-8859-15)");
            }
        }
    }
}
