Wojciech Piekutowski
2009-Apr-18 19:42 UTC
[Mechanize-users] [PATCH] When user provides an encoding then use it, otherwise autodetect it
Hi, I''ve created a small patch to mechanize. The problem: The user should be able to set his own page encoding, for example when <meta /> encoding information can is invalid or auto detection routines fail to guess correctly. Actual results: Mechanize will use the encoding detected by it (or Nokogiri/libxml2) always when there''s a <meta /> with encoding information included. User can only set his encoding when there''s no <meta />. Expected results: Mechanize should allow the user to always force his own encoding. Commit: http://github.com/wpiekutowski/mechanize/commit/2af5e6b2c520cca96cd5fe18df284f57d09c3cef Greetings, Wojciech
Aaron Patterson
2009-Apr-18 20:25 UTC
[Mechanize-users] [PATCH] When user provides an encoding then use it, otherwise autodetect it
On Sat, Apr 18, 2009 at 12:42 PM, Wojciech Piekutowski <wojciech at piekutowski.net> wrote:> Hi, > > I''ve created a small patch to mechanize. > > The problem: > The user should be able to set his own page encoding, for example when > <meta /> encoding information can is invalid or auto detection > routines fail to guess correctly. > > Actual results: > Mechanize will use the encoding detected by it (or Nokogiri/libxml2) > always when there''s a <meta /> with encoding information included. > User can only set his encoding when there''s no <meta />. > > Expected results: > Mechanize should allow the user to always force his own encoding. > > Commit: > http://github.com/wpiekutowski/mechanize/commit/2af5e6b2c520cca96cd5fe18df284f57d09c3cefLooks good. I''ve added you to the project, so you get to merge. :-) -- Aaron Patterson http://tenderlovemaking.com/