Thanks, the database table is using utf8. I was getting the data with File.stream!(@filename)
. While researching how to encode the input data as latin1, I came across this thread: wtUTF8 - encoding issues reading CSV file. Just replacing File.stream!(@filename)
with File.stream!(@filename, [encoding: :latin1])
fixed it.