fix encoding and csv