Fix encodings during printing to console