set string encodings
check the encoding of the input string