What you describe looks like Windows ASCII mode. I thought (from the 
description on the wget site) that BINARY mode was the default?

Can you try to explicitly specify either type=I or type=a 
and see what you get?


-----Original Message-----
From: Fi Dot [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 14, 2006 2:17 AM
To: wget@sunsite.dk
Subject: Weird behavour of wget on Win32 while outputting file to stdout

Hi, many-respected all!

Recently, playing with wget on win32 (version 1.10.2, downloaded from
http://users.ugent.be/~bpuype/wget/ ), I have encountered a problem
which I'd like to share with ya.

When I do

wget -O - http://foo/bar

the stream I get on STDOUT is corrupt.

Let's say, I do

wget -O - http://foo/bar > bar.downloaded

'bar.downloaded' is slightly bigger than original 'bar'.

Closer examination unveils:

$ od -t x1 bar.downloaded

0000000 89 50 4e 47 0d 0d 0a 1a 0d 0a 00 00 00 0d 49 48
0000020 44 52 00 00 01 8e 00 00 02 58 08 02 00 00 00 fa
0000040 e9 96 84 00 00 00 09 70 48 59 73 00 00 00 64 00
0000060 00 00 64 00 0f 96 c5 dd 00 00 00 46 74 45 58 74

$ od  -t x1 bar

0000000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52
0000020 00 00 01 8e 00 00 02 58 08 02 00 00 00 fa e9 96
0000040 84 00 00 00 09 70 48 59 73 00 00 00 64 00 00 00
0000060 64 00 0f 96 c5 dd 00 00 00 46 74 45 58 74 52 61

that all 0x0As get preceded with 0x0Ds.

I think that's a bug in the code (I have not found a command line
option that does that) - it's not binmoding STDOUT. That's my guess.

I will appreciate any comments :)

Thx!

Fidot.

Reply via email to