// 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) using System; using System.Text; namespace Dec { public class Program { public static void Main(string[] args) { byte[] b = new byte[256]; for(int i = 0; i < b.Length; i++) b[i] = (byte)i; String s1 = Encoding.GetEncoding("ISO-8859-1").GetString(b); String s2 = Encoding.GetEncoding(1252).GetString(b); for(int i = 0; i < s1.Length; i++) if(s1[i] != s2[i]) Console.WriteLine(i + " " + (int)s1[i] + " " + (int)s2[i]); } } }