Exact error was -
Encoding::CompatibilityError: incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string)
from org/jruby/RubyString.java:2853:in gsub' from /home/prashant/.rvm/gems/jruby-1.6.4/gems/mojibake-1.0.0/lib/mojibake/mapper.rb:127:inrecover'
This was when I tried to recover from the content of a file, after reading the content its content was set to ASCII-8BIT , I did not force_encode to iso or windows-1252 because characters were mixed.