Subject: Re: Possible ZSH bug with IO direction
From: Peter Stephenson <[email-masked]>
To: [email-masked]
Date: Sun, 24 Apr 2016 13:17:48 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Sat, 23 Apr 2016 15:14:36 -0700
Bart Schaefer <[email-masked]> wrote:
> On Apr 24,  4:30am, Roger Qiu wrote:
> }
> }  > gm convert -compress JPEG - - < input.jpg > output.jpg
> } gm convert: Corrupt JPEG data: 873 extraneous bytes before marker 0xd9 
> } (/tmp/gmo1fx92).
> 
> I suspect you are encountering the issue that "gm" wants input.jpg in
> binary mode, but zsh's input redirection operator has forced it to text
> mode.  A lengthy comment in Src/main.c (copypasted below) explains this.  

Mounting the filesystem within Cygwin as binary works here.  Typically
that's the right thing to do if you're dealing with Unix-y type files,
but if you want reasonably transparent handling of Windows text files
it's not the right thing to do.

pws