Skip to content

Instantly share code, notes, and snippets.

@kevn
Created June 16, 2010 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevn/440075 to your computer and use it in GitHub Desktop.
Save kevn/440075 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# encoding: ascii-8bit
require 'rubygems'
require 'mail'
puts "Ruby version: #{RUBY_VERSION}"
puts "Mail gem version: #{Mail::VERSION::STRING}"
address = "josé.cuervo@cactus.com"
puts "Source encoding: #{__ENCODING__}" if defined?(__ENCODING__)
puts "String encoding: #{address.encoding}" if address.respond_to?(:encoding)
puts Mail::Address.new(address).address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment