small fix for utf encoding
This commit is contained in:
parent
bfd2b8abeb
commit
033e7071d3
|
@ -68,7 +68,7 @@ wb.add_worksheet(name: remove_illegal_utf8(@survey.title[0..15])) do |sheet|
|
|||
|
||||
else
|
||||
if answer[question.id.to_s]
|
||||
answer_row << answer[question.id.to_s]
|
||||
answer_row << remove_illegal_utf8(answer[question.id.to_s])
|
||||
else
|
||||
answer_row << ''
|
||||
end
|
||||
|
@ -77,9 +77,9 @@ wb.add_worksheet(name: remove_illegal_utf8(@survey.title[0..15])) do |sheet|
|
|||
if question.custom_option
|
||||
if !answer[question.id.to_s].blank?
|
||||
if answer[question.id.to_s].class == Array
|
||||
answer_row << (answer[question.id.to_s] - options).join
|
||||
answer_row << remove_illegal_utf8((answer[question.id.to_s] - options).join)
|
||||
elsif answer[question.id.to_s].class == String
|
||||
answer_row << ([answer[question.id.to_s]] - options).join
|
||||
answer_row << remove_illegal_utf8(([answer[question.id.to_s]] - options).join)
|
||||
end
|
||||
else
|
||||
answer_row << ''
|
||||
|
|
Loading…
Reference in New Issue