I’m having the error: Iconv::InvalidEncoding: invalid encoding
("“ISO-8859-1"”, “UTF-8”) when trying to post via Mechanize.
It used to work just fine, but the error appeared after (I think)
upgrading to Rails 2.3.2, Ruby 1.8.7, Mechanize 0.9.2 (I upgraded a
while ago and only now noticed the problem).
What does it mean? Is there any way to disable/bypass the error?
Any help would be much appreciated!
What does it mean? Is there any way to disable/bypass the error?
Any help would be much appreciated!
Two things, try without the double quotes in the first argument (unless
this
is just a transcription error), and have you checked that there is no
invalid
codes in the input, i.e. that the input is truely ASCII or Latin-1? I
have
similar errors but every time I’ve looked, it is because the source has
garble
in it. Latin-1 but they claim it is UTF-8 (these are RSS feeds), or no
encoding info at all (perhaps some Windows encoding).
I have not figured out how to get Iconv to recover from errors; if you
do,
please post the solution here.
Jeffrey
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.