changed tried_encodings to set