detect encodings