Skip to content

Commit

Permalink
🐛 make UnicodeWriter to work with python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Nov 10, 2017
1 parent b3e7d83 commit 60d375b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyexcel_io/writers/csvw.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def writerow(self, row):
for s in row])
# Fetch UTF-8 output from the queue ...
data = self.queue.getvalue()
data = data.decode("utf-8")
if compact.PY2:
data = data.decode("utf-8")
# ... and reencode it into the target encoding
data = self.encoder.encode(data)
# write to the target stream
Expand Down

0 comments on commit 60d375b

Please sign in to comment.