zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Possible ZSH bug with IO direction
Date: Sun, 24 Apr 2016 13:17:48 +0100	[thread overview]
Message-ID: <20160424131748.441d605f@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <160423151436.ZM6912@torch.brasslantern.com>

On Sat, 23 Apr 2016 15:14:36 -0700
Bart Schaefer <schaefer@brasslantern.com> 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


  reply	other threads:[~2016-04-24 12:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23 18:30 Roger Qiu
2016-04-23 22:14 ` Bart Schaefer
2016-04-24 12:17   ` Peter Stephenson [this message]
2016-04-24 18:36     ` Bart Schaefer
2016-04-24 19:01       ` Peter Stephenson
2016-04-24 21:23         ` m0viefreak
2016-04-25  9:12           ` Peter Stephenson
2016-04-25 17:25           ` Peter A. Castro
2016-04-24 21:53         ` Bart Schaefer
2016-04-25  8:46           ` Peter Stephenson
2016-04-25 21:12           ` Mikael Magnusson
2016-04-25 17:16         ` Peter A. Castro
2016-04-24 17:08   ` Roger Qiu
2016-04-24 18:35     ` Bart Schaefer
2016-04-25 17:31       ` Peter A. Castro
2016-04-25 17:47         ` Bart Schaefer
2016-04-25 18:14           ` Peter A. Castro
2016-04-26  9:16             ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160424131748.441d605f@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).