Ignore Iconv::IllegalSequence while using Ruby WWW::Mechaniz

Hello, I’ve encountered the Iconv::IllegalSequence error on some web
pages when using mechanize lib. Is there a way to make mechanize just
omit ill encoded characters and return the “cut” page? TIA

-------- Original-Nachricht --------

Datum: Sat, 22 Aug 2009 20:41:49 +0900
Von: Rodion R. [email protected]
An: [email protected]
Betreff: Ignore Iconv::IllegalSequence while using Ruby WWW::Mechaniz

Hello, I’ve encountered the Iconv::IllegalSequence error on some web
pages when using mechanize lib. Is there a way to make mechanize just
omit ill encoded characters and return the “cut” page? TIA

Posted via http://www.ruby-forum.com/.

Dear Rodion,

there is an IGNORE option in Iconv :

http://groups.google.com/group/ruby-talk-google/browse_thread/thread/96c75d3587012556

Your output might (also) depend on some settings of your operating
system,
language locale etc.
For instance, on Ubuntu 9.04, Ruby 1.8.7-p160, the second conversion in
the code in the link above gives me “caff?” instead of “caff`e”, which
is
apparently a Ubuntu-specific thing. Look for some discussion here:

Best regards,

Axel