# File lib/jpmobile/rack/filter.rb, line 10
      def call(env)
        # 入力を保存
        mobile = env['rack.jpmobile']

        status, env, response = @app.call(env)

        if mobile
          if content_type = env['Content-Type']
            type, charset = content_type.split(/;\s*charset=/)
          else
            type    = nil
            charset = nil
          end

          body = response_to_body(response)
          body = body.sub('<input name="utf8" type="hidden" value="&#x2713;" />', ' ')

          response, charset = mobile.to_external(body, type, charset)

          if type and charset
            env['Content-Type'] = "#{type}; charset=#{charset}"
          end
        end

        new_response = ::Rack::Response.new(response, status, env)
        new_response.finish
      end