bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #27983] Windows text mode mis-interpreted


From: Eric Blake
Subject: [bug #27983] Windows text mode mis-interpreted
Date: Mon, 12 Apr 2010 15:48:55 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9

Follow-up Comment #8, bug #27983 (project findutils):

If you really want xargs to handle data from a native windows application,
then add d2u into the pipeline:

app | d2u | xargs

That is a one-size-fits-all solution - it works no matter the windows app on
the left and no matter the consumer on the right.  And since it works, I see
no reason to teach xargs, and every other potential consumer on the right, to
be tolerant, when you can merely insert d2u to convert from one paradigm to
the other.  That is, xargs is just fine living in a paradigm of POSIX
binary-only behavior, and if you need to interact with text mode, limit the
interaction to the boundary - I still don't see why xargs should ever force
text.

On the other hand, using the 'force binary' hint, particularly in concert
with -0, is definitely worth including in xargs proper.  However, rather than
making the patch hard-coded on #ifdef __CYGWIN__, it would be better to help
gnulib introduce a module (or enhance the existing binary-io module) to make
it easier to change an existing stream to binary-only.  I've mentioned it
before, and even submitted potential patches, but have not yet had time to
complete a solution that everyone was happy with:
http://lists.gnu.org/archive/html/bug-gnulib/2010-03/msg00111.html.  Once we
have that solution in gnulib, then your patch to reopen input_stream in binary
mode makes sense.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27983>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]