carrierwave

https://github.com/carrierwaveuploader/carrierwave

Ruby

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks

Mail::Ruby19.pick_encoding

Pick a Ruby encoding corresponding to the message charset. Most
charsets have a Ruby encoding, but some need manual aliasing here.

TODO: add this as a test somewhere:
  Encoding.list.map { |e| [e.to_s.upcase == pick_encoding(e.to_s.downcase.gsub("-", "")), e.to_s] }.select {|a,b| !b}
  Encoding.list.map { |e| [e.to_s == pick_encoding(e.to_s), e.to_s] }.select {|a,b| !b}

Source | Google | Stack overflow

Edit

git clone [email protected]:carrierwaveuploader/carrierwave.git

cd carrierwave

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Mail--Ruby19-pick_encoding-for-pr


# Commit to git

git add git commit -m "better docs for Mail::Ruby19.pick_encoding"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Mail--Ruby19-pick_encoding-for-pr

hub pull-request


# Celebrate!