fix utf-8 bug in csv writer