similar to: Convert data to utf-8

Displaying 20 results from an estimated 500 matches similar to: "Convert data to utf-8"

2007 Jul 30
6
Object.stubs doesn''t seem to work.
Hi I''m using Mocha 0.5.3 and I want to stub out a call to Time.now, just like the example in the post http://blog.floehopper.org/articles/2007/06/08/mocha-0-5-released However, trying it in irb gets me the following error: >> require ''mocha'' => true >> Time.stubs(:now).returns(Time.parse(''Thu Feb 01 00:00:00 UTC 2007'')) NoMethodError:
2005 Aug 10
24
Multilingual Rails v0.5. Big update!
Multilingual Rails v0.5 is just released with lots of new features. Here is the changelog: v0.5: New charset conversion string-methods. Multilingual Rails always use UTF-8 internally. iconv_to(charset) # Return string as charset iconv_from(charset) # Return string as UTF-8, converted from charset iconv_from!(charset) # Convert string from charset to UTF-8
2007 May 19
2
196 packages to install or update ??
Hi, today I did a yum upgrade and see that there was 193 packages to update and 3 packages to install... I always upgraded my server (with yum) on a weekly basis so I don't undestand how it is possible to have a so big update. Is there something wrong with my yum setup ? A mix between different versions of CentOS ? I'm running CentOS 4 i386 Thank you
2010 Jun 03
3
issue submitting a form
Hi. Recently I started rebuilding my old Mechanize script, which I used to automatically log in to a certain site and retrieve files from it. Old version worked great, however, when I did the update it started complaining. Here''s the log of the error: /Users/lukastolyarov/.gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize/form/field.rb:30:in `<=>'': undefined method
2012 Feb 16
3
Mechanize::ResponseCodeError: 500
> Excuse me if my issue is a little bit application-specific. I need > Mechanize to submit bunch of data from our server to an online reservation > system. The url is https://secure.mdausa.org/donate/ > It works in my browser however using mechanize following error appears: > > /Library/Ruby/Gems/1.8/gems/mechanize-2.0.1/lib/mechanize/http/agent.rb:241:in > `fetch'':
2010 Sep 01
4
NoMethodError: undefined method `force_encoding' for "Conten
Hi everyone! Im trying to install mechanizer from http://github.com/tenderlove/mechanize. I`ve clone the project into /tmp folder. When I do rake inside the folder /tmp/mechanizer it gives me this error: mac159180:mechanize renatosis$ rake (in /private/tmp/mechanize) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -Ilib:bin:test:. -e ''require "rubygems";
2009 Jun 25
2
Bad Form?
Hi, This is my first post, I wanted to ask a quick question about "Bad Form" -- rather, am I doing something with Mechanise I shouldn''t be doing? Here''s the long and short of it - I am using Mechanize with Cucumber and RSpec to test a *ahem* Perl XML web service.. talk about technology soup, but I have it working quite well. I have an example project on GitHub that
2007 Mar 25
5
mechanize 0.6.6 Released
mechanize version 0.6.6 has been released! http://mechanize.rubyforge.org/ The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, can follow links, and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history. Changes: =
2012 Jan 27
2
dealing with Encoding::UndefinedConversionError: "\xA2" from ASCII-8BIT to UTF-8
I''m 99% certain that this is what''s being discussed in https://github.com/tenderlove/mechanize/issues/168 But I''m not sure what the remedy is. My production app is running on Heroku, so I need a fix that I can push there. Can someone post instructions that this neophyte can follow? (I gather I''m supposed to fork and add the current master version from
2012 Jul 23
2
Mechanize::Agent#post_connect_hook response != Mechanize#parse response
I''m working through an idea for a db-backed cache for Mechanize#get(). The idea is to use a Mechanize::Agent#post_connect_hook to cached any fetch data, and create a subclass of Mechanize::Agent#get() that checks the cache before calling super. I want to store the un-parsed (raw) page in the db, and call Mechanize#parse when there''s a cache hit, something along these lines:
2010 Oct 20
2
Mechanize::ResponseCodeError: 500
Also, excuse me if my issue is a little bit application-specific. I need Mechanize to submit bunch of data from our server to an online reservation system. The url ishttp://hajres.iranair.com/haj/request.php" It works in my browser however, using mechanize following error appears: >> agent.get("http://hajres.iranair.com/haj/request.php") Net::HTTP::Get: /haj/request.php
2007 Nov 12
3
Weird error downloading a gzip''ed file
Hi all, I''ve been using mechanize for a while and it rocks. Docs are pretty clear and so far I''ve been able to do it on my own. However, I''m stuck in a weird situation in a script to download my contact list from hotmail. I''ve used Firebug to check all urls, and tested it by hand while logged in via browser. Even in the script everything works well until the
2008 Jan 16
3
settings headers in mechanize
hi, a potential mechanize user here. i''ve looked at the API but it''s not clear what capacity there is to arbitrarily set the headers - does mechanize allow for this? mechanize is clearly great for web browsing, but i also need to construct get and post requests from scratch. i''ve looked at net:http, libcurl, openuri, but mechanize seems simpler and more functional than
2009 Sep 17
1
Load Error Using Mechanize Gem
Hi, I''m getting a "Could not open any of [xml2, xslt, exslt] (LoadError)" error when trying to run a simple Ruby program taken from the EXAMPLES.rdoc file of the Mechanize gem. The error is in this line of the Nokogiri module of libxml.rb: ffi_lib ''xml2'', ''xslt'', ''exslt'' Not sure if there are missing gems, and if so,
2007 Oct 07
1
How to store a Mechanize object in the database?
Hi, I am trying to save a Mechanize object in database (using a Rails Model). But the save operation throws a TypeError Considering that "agent" is an instance of a Rails Model and "user" is defined as a "text" type in the Model. irb(main):039:0> agent.user = WWW::Mechanize.new #<WWW::Mechanize:0xb71295f0 @follow_meta_refresh=false, @key=nil,
2006 Dec 09
1
manipulate headers?
Hi... Here''s a working Perl script that I want to be able to do in Ruby: use WWW::Mechanize; my $url = "http://host/tt?name=chris"; my $mech = WWW::Mechanize->new(); $mech->add_header( Referer => "http://chrismcmahonsblog.blogspot.com" ); $mech->add_header( Cookie => "messageid=170118; memberid=1007"); $mech->get($url) so the header
2008 Jan 15
1
Converting Watir script to Mechanize
I have a Watir script that I would like to convert to a Mechanize script. The watir code looks like this require ''watir'' include Watir def test ie = IE.new ie.goto(''http://cpref.gsm.com/inter.asp?r=8084'') ie.text_field(:name, ''inter_string'').set(''Potassium'') ie.button(:id, ''image1'').click
2009 Apr 09
1
undefined method ''text'' ...
Just trying to run the example ***** require ''rubygems'' require ''mechanize'' a = WWW::Mechanize.new a.get(''http://rubyforge.org/'') do |page| # Click the login link login_page = a.click(page.links.text(/Log In/)) # Submit the login form my_page = login_page.form_with(:action => ''/account/login.php'')
2007 Jul 28
3
problem with a form
Hello I am trying to fill in a form using WWW::Mechanize. I can fill in 2 of the 3 fields but one is giving me a problem. The name of this field is "name" when I use the following bit of code, it seems to change the name of the form, not the value of the field. The part of original page after pretty printing {forms #<WWW::Mechanize::Form {name "wp_pers_form"}
2007 Jul 12
1
WWW::Mechanize::Link.inspect needs some TLC
The problem: users trying to debug Mechanize apps with Komodo are finding the debugger times out once it''s loaded a web page. They don''t run into this in the ruby-debug debugger, or running in normal mode. The reason: Komodo''s debugger is graphical, which means that whenever it hits a breakpoint it automatically shows the contents of each local variable. It has a