Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export csv give me error unknown encoding name - latin1 #2191

Closed
nunziofiore opened this issue Feb 18, 2015 · 8 comments
Closed

export csv give me error unknown encoding name - latin1 #2191

nunziofiore opened this issue Feb 18, 2015 · 8 comments

Comments

@nunziofiore
Copy link

indipendent from the columns I choose I have always this error:

error unknown encoding name - latin1

@nunziofiore
Copy link
Author

@nunziofiore
Copy link
Author

@nunziofiore nunziofiore changed the title export csv give me error unknown encoding name - latin export csv give me error unknown encoding name - latin1 Feb 18, 2015
@nunziofiore
Copy link
Author

ok i tested and in this way you can fix

nunziofiore@0018bdd

I have no the right to make a pull request so let the issue open for you

@ekkans
Copy link

ekkans commented Jun 14, 2015

Hi – thanks @nunziofiore!

I have the same problem. Meanwhile it's fixed in the main repo, it's possible to write the following code in ./config/initializers/rails_admin.rb for example

module RailsAdmin
  class CSVConverter
    remove_const(:UTF8_ENCODINGS) if (defined?(UTF8_ENCODINGS))
    UTF8_ENCODINGS = [nil, '', 'utf8', 'utf-8', 'unicode', 'UTF8', 'UTF-8', 'UNICODE', 'utf8mb4', 'latin1']
  end
end

@iMacTia
Copy link

iMacTia commented Aug 9, 2015

Same problem here! Thanks @ekkans! Can't believe this hasn't been fixed yet.
If rails_admin requires particular DB encoding, just let us know...

@tagliala
Copy link
Contributor

Hi,

I also run into this issue

Unfortunately latin1 is not unicode, so adding it to UTF8_ENCODINGS is not a solution.

As per https://it.wikipedia.org/wiki/ISO/IEC_8859-1, latin1 should map to ISO-8859-1

tagliala added a commit to diowa/rails_admin that referenced this issue Dec 10, 2015
tagliala added a commit to diowa/rails_admin that referenced this issue Dec 13, 2015
tagliala added a commit to diowa/rails_admin that referenced this issue Dec 13, 2015
tagliala added a commit to diowa/rails_admin that referenced this issue Dec 13, 2015
@pamio
Copy link

pamio commented Jan 20, 2016

@ekkans I had the same issue and your workaround fixed it form. However, is it not fixed in the main branch yet ?

@tagliala
Copy link
Contributor

Not yet merged, please give a try to my branch:

gem 'rails_admin', github: 'diowa/rails_admin', branch: 'encoding-fix'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants