add detect script for encodings