run set_encoding spec only for 1.9 and above