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

charset correction (utf-8) for uploaded (txt/html) documents #76

Open
testbird opened this issue May 4, 2014 · 0 comments
Open

charset correction (utf-8) for uploaded (txt/html) documents #76

testbird opened this issue May 4, 2014 · 0 comments

Comments

@testbird
Copy link

testbird commented May 4, 2014

If you find a way to do this in ruby, I would be glad to add some
zafu/rubyless methods to support the transformation, probably by
having some form field with the encoding and Zena would tranform to
utf-8 before saving to the database...

For ruby 1.8 people are pointing to the iconv gem:
http://stackoverflow.com/questions/3663513/simple-conversion-of-string-to-utf-8-in-ruby-1-8
http://stackoverflow.com/questions/12947910/force-strings-to-utf-8-from-any-encoding
http://stackoverflow.com/questions/951891/how-can-i-convert-a-string-from-windows-1252-to-utf-8-in-ruby

Ruby 1.9 seems to come with a build-in encode method.

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

1 participant