If I delete that part of the text, it raises again in other location.
This is really strange because the contents locally and on production
are exactly the same. Here is the text I am trying to convert (user
created data): https://gist.github.com/1664294. Any ideas?
$ ruby convert.rb
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': iconv will be deprecated in the future, use String#encode instead. convert.rb:7:in conv’: " style="padding-"… (Iconv::IllegalSequence)
from convert.rb:7:in `’
Thank you very much Peter! I used your code and replaced these UTF-8
only chars for similars in ISO-8859-1 (tryed the transliterate mehod but
it seems it doesn’t work for special chars).