Skip to content

Commit

Permalink
add encoding parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ingcrengifo committed Feb 26, 2021
1 parent 15a49a5 commit 7134660
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion singer_encodings/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_row_iterator(iterable, options=None):
which can be used to yield CSV rows."""
options = options or {}

file_stream = codecs.iterdecode(iterable, encoding='utf-8')
file_stream = codecs.iterdecode(iterable, encoding=options.get('encoding', 'utf-8'))

# Replace any NULL bytes in the line given to the DictReader
reader = csv.DictReader((line.replace('\0', '') for line in file_stream), fieldnames=None, restkey=SDC_EXTRA_COLUMN, delimiter=options.get('delimiter', ','))
Expand Down

0 comments on commit 7134660

Please sign in to comment.