Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ irb
- ruby-1.9.1-p378 > string = "Jürgen Müller"
- => "Jürgen Müller"
- ruby-1.9.1-p378 > string.force_encoding("BINARY").encode("UTF-8", :invalid => :replace, :replace => "")
- Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8
- from (irb):2:in `encode'
- from (irb):2
- from /Users/norman/.rvm/rubies/ruby-1.9.1-p378/bin/irb:17:in `<main>'
- ruby-1.9.1-p378 >
Add Comment
Please, Sign In to add comment