YourNextRepresentative/Apache is serving up the CSV files with
Content-Type: text/csv. This means that Ruby is interpreting them as
ASCII-8BIT rather than UTF-8, which in turn causes problems with Liquid,
which expects everything to be in UTF-8. By saving them to the
filesystem Ruby reads them as UTF-8 by default, which is what we want
and eliminates the error.
This might also be a good way to rebuild the site when there's new data.
We simply put the new CSVs onto the master branch and then the site will
be rebuild from them.
YourNextRepresentative/Apache is serving up the CSV files with
Content-Type: text/csv
. This means that Ruby is interpreting them as ASCII-8BIT rather than UTF-8, which in turn causes problems with Liquid, which expects everything to be in UTF-8. By saving them to the filesystem Ruby reads them as UTF-8 by default, which is what we want and eliminates the error.This might also be a good way to rebuild the site when there's new data. We simply put the new CSVs onto the master branch and then the site will be rebuild from them.