Encoding the text