in reply to Scrambled text in downloaded webpages

Most likely, the response Transfer-Encoding says "compressed". You will need to look at ->decoded_content instead of directly storing the output to a file.

Replies are listed 'Best First'.
Re^2: Scrambled text in downloaded webpages
by daxim (Curate) on Aug 01, 2012 at 11:43 UTC
    Mechanize doesn't have decoded_content, only content which DWYM.
Re^2: Scrambled text in downloaded webpages
by Sj03rd (Initiate) on Aug 01, 2012 at 11:56 UTC

    Thank you Corion! One way to do what you suggest is described here: http://stackoverflow.com/questions/1285305/how-can-i-accept-gzip-compressed-content-using-lwpuseragent/1285328#1285328 This solved the problem for me.