Supports the encoding of the console and encodes the text to display if needed