mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-17 22:42:22 +08:00
Ensure that the export CSV inventory items are in UTF-8 [SCI-9307] (#6590)
This commit is contained in:
parent
3f4c6c8095
commit
2bd84a12e9
2 changed files with 2 additions and 1 deletions
|
|
@ -328,6 +328,7 @@ class RepositoriesController < ApplicationController
|
|||
render json: {
|
||||
html: render_to_string(
|
||||
partial: 'shared/flash_errors',
|
||||
formats: :html,
|
||||
locals: { error_title: t('repositories.import_records.error_message.errors_list_title'),
|
||||
error: t('repositories.import_records.error_message.no_repository_name') }
|
||||
)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class RepositoryZipExportJob < ZipExportJob
|
|||
repository,
|
||||
nil,
|
||||
params[:my_module_id].present?)
|
||||
File.binwrite("#{dir}/export.csv", data)
|
||||
File.binwrite("#{dir}/export.csv", data.encode('UTF-8', invalid: :replace, undef: :replace))
|
||||
end
|
||||
|
||||
def failed_notification_title
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue