Explicitly use UTF-8 encoding when opening spreadsheet files

This commit is contained in:
Matt-Yorkley
2018-11-07 16:50:24 +00:00
parent 4155f086e0
commit b5c6ecb45a

View File

@@ -205,7 +205,7 @@ module ProductImport
def open_spreadsheet
if accepted_mimetype
Roo::Spreadsheet.open(@file, extension: accepted_mimetype)
Roo::Spreadsheet.open(@file, extension: accepted_mimetype, encoding: Encoding::UTF_8)
else
errors.add(:importer, I18n.t(:product_importer_spreadsheet_error))
delete_uploaded_file