Sunday, 8 September 2013

ActiveAdmin, CSV import. Change encoding to cp1251

ActiveAdmin, CSV import. Change encoding to cp1251

I use ActiveAdmin. ActiveAdmin provides CSV file downloads on the index
screen for each Resource How can I change encoding of CSV file to cp1251?

2 comments:

  1. Just add this to activeadmin's initializer:

    config.csv_options = { encoding: 'cp1251' }

    ReplyDelete
  2. Are you sure config.csv_options = { encoding: 'cp1251' } works?

    ReplyDelete