Autodetect multiple encodings