This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Bogus assumption prevents d2u/u2d/conv/etal working on mixed files.


> From: David Fritz

> You guys are missing the point.  Charles Wilson mentioned a side
> effect of the
> code at issue in the original post and suggested that it was valuable.

 I'm opposing the 'valuable' in this. Running commands from the prompt has
always required some knowledge and thought. The 'no limits' - at your own
risk - has always increased the usefulness and power.
 If there is to be limits, that should be applied using file 'rwx' rights
(chmod).

> Personally, I don't care if they attempt to detect binary files
> or not.  My point was (and is) that: *If detection of binary files is
> desirable*, then why not implement it in a more robust manner and
> inform the user rather than silently skipping "binary" files.

 That's an aproach I can accept. If paired with a --force switch.

> Hannu E K Nevalainen wrote:
> > A more "foolproof" (? does such a thing exist) test would be to
> > disallow using d2u/u2d on anything in directories found in $PATH.
> > But then that one has its disadvantages too, but less so IMO.
> >
> >  I find all this "safety" related stuff be a PITA at times. Any
> > kind of test is prone to fail at some instances; at other instances
> > just a cause for confusion most of the time -> a lot of bug-hunting
>  - for so little gain.
> >
> >  How about running d2u/u2d, say, on a regedit 5 file (ie;
> mostly ascii but
> > due to the coding every other character is a NUL)?
> >  Would that be considered "legal"? IMO it should, a fast and easy way to
> > strip the garbage - to create a file that can be used with normal tools.
> >
>
> Huh?  u2d/d2u will not strip the "garbage".

 Ah... I went too far on that, yes :-P

>  For that use iconv; as in,
>
> $ iconv -f UTF-16LE -t UTF-8 < in > out

 Hmm... thats a new one... :-)
Every day you learn something new...

> >  Make Backups, Not War!  -> MBNW!  ;-P
> >
>
> OLOCA?

 Not yet ;-)  *SKIPPING-HIGH-INTO-THE-AIR-WAVING-HANDS*

/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E

** on a mailing list; please keep replies on that particular list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]