From b5c6ecb45a745fa27485109b6c3bd7d01d729f49 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:50:24 +0000 Subject: [PATCH] Explicitly use UTF-8 encoding when opening spreadsheet files --- app/models/product_import/product_importer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/product_import/product_importer.rb b/app/models/product_import/product_importer.rb index 3bc66fa815..62879d9785 100644 --- a/app/models/product_import/product_importer.rb +++ b/app/models/product_import/product_importer.rb @@ -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