A tiny gem for those who are tired of
if RUBY_VERSION.to_s =~ /^1.9/
Encoding.default_internal = Encoding::UTF_8
Encoding.default_external = Encoding::UTF_8
end
copied-and-pasted across all of your apps and libraries.
gem install effin_utf8
gem "effin_utf8"
and then, somewhere early on application boot
require "effin_utf8"
Not really. It has effect on 1.9 and doesn't on 1.8.7. That's it.
Apache Public License 2.0. See LICENSE file for details.