Skip to content

Commit

Permalink
[FIX] use utf-8-sig decoding for CSV file from Windows Environments
Browse files Browse the repository at this point in the history
  • Loading branch information
chafique-delli committed Feb 17, 2023
1 parent ae76975 commit 4baccd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pattern_import_export_csv/models/pattern_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PatternFile(models.Model):
_inherit = "pattern.file"

def _parse_data_csv(self, datafile):
in_file = io.StringIO(datafile.decode("utf-8"))
in_file = io.StringIO(datafile.decode("utf-8-sig"))
config = self.pattern_config_id
if config.header_format == "description_and_tech":
# read the first line to skip it
Expand Down

0 comments on commit 4baccd8

Please sign in to comment.