csv_text = params[:csv].tempfile
# encoding
# csv = File.read(csv_text.path, encoding: 'utf-16')
csv = File.read(csv_text.path, encoding: "UTF-16LE:UTF-8")
puts '==encoding==='
p csv.encoding
p csv
csv = CSV.parse(csv, encoding: "UTF-16LE:UTF-8")
csv.each_with_index do |item, index|
puts '==='
p item
end