エンコーディングは俺が決める

RubyのMechanize、使っている人はどのくらいいるのだろう?
少し前のruby-listに「MechanizeはRubyキラーアプリになる云々。」という投稿があったけれど、そんなにニーズがあるのだろうか?自分は便利に使っているけれど・・。
そのMechanize、ページのエンコーディングを勝手に判断する。それが正しければ問題ないのだが・・。
だいたい、Mechanizeでウェブにアクセスするような人は対象のサイトのエンコーディングは当然知っている。
だからエンコーディングを指定させてくれ、と思うのだが、現時点ではその手段は無い。
将来的にはどうだろう。

とりあえず、自分はMechanizeをrequireした後に

class WWW::Mechanize::Page
    def initialize(uri=nil, response=nil, body=nil, code=nil, mech=nil)
        @encoding = 'Shift_JIS'
        body = Util.to_native_charset(body, @encoding) rescue body
        super(uri, response, body, code)
        @mech           ||= mech
        raise Mechanize::ContentTypeError.new(response['content-type']) unless
           response['content-type'] =~ /^(text\/html)|(application\/xhtml\+xml)/i
        @parser = @links = @forms = @meta = @bases = @frames = @iframes = nil
    end
end

を追加してごまかしてます。
エンコーディングShift_JISの場合です。