Fix encodding in exporting results