On Mon, 16 Oct 2006, Fi Dot wrote:

> Yeah. It was exactly the issue of not binmoding STDOUT.
> 
> Patch attached - it seems to fix the problem.

I think that patch is a start, but is incomplete. The wget code already
uses O_BINARY rather than _O_BINARY. Also, you don't want binary output
to go to your screen. You probably need to do something more like:

#if !defined(O_BINARY) && defined(_O_BINARY) 
#define O_BINARY _O_BINARY
#define setmode _setmode
#endif

#ifdef O_BINARY
if !isatty(fileno(stdout))
setmode(stdout, O_BINARY);
#endif

You might want to look at the DOS patch I submitted to wget-patches on
April 6, 2005, for more things to consider regarding DOS and Windows
forbidden names when downloading.

                           Doug
-- 
Doug Kaufman
Internet: [EMAIL PROTECTED]


Reply via email to