fix encoding errors in export