Prefer String#encode over Iconv for Ruby 2.0 compat
Avoid utf8 regular expression error in Ruby 2.0
Clean up Iconv usage and fix indents
Merge @hdmoore's Ruby 2.0 fixes (iconv)