home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,379 of 243,242   
   David Brown to Scott Lurndal   
   Re: is_binary_file()   
   09 Dec 25 09:03:36   
   
   From: david.brown@hesbynett.no   
      
   On 08/12/2025 21:16, Scott Lurndal wrote:   
   > Michael Sanders  writes:   
   >> On Sat, 6 Dec 2025 03:14:55 -0500, Paul wrote:   
   >>   
   >>> It is the year 2025.   
   >>>   
   >>> How many times do you suppose someone has considered this question ?   
   >>>   
   >>> I'm not trying to be a smart ass by saying this, just that the   
   >>> question is bound to be nuanced. You can do a fast and totally   
   >>> inaccurate determination. You can do a computationally expensive   
   >>> or I/O expensive determination.   
   >>   
   >> I get it Paul, but as with all things, there's lots of opinions on this.   
   >>   
   >>> There has to be a reason for doing this, and a damn good reason.   
   >>>   
   >>> *******   
   >>>   
   >>> There is the "file" command.   
   >>>   
   >>> It was invented in 1973.   
   >>>   
   >>>     https://en.wikipedia.org/wiki/File_%28command%29   
   >>>   
   >>> The beauty of this command, is it has some sort of ordered   
   >>> approach to file determination.   
   >>   
   >> And... is not generally available on Windows   
   >   
   > It is open source and could be built for windows.   
   >   
   > It's also included in any linux distribution running   
   > under WSL.   
   >   
      
   It is available anywhere you find Windows ports of common *nix   
   utilities, such as the msys2 project.  (And while an msys2 installation   
   can be quite large, it's possible to pull out individual utilities if   
   you need to.)  Still, it's fair to say that most Windows installations   
   don't have it.   
      
   But surely on Windows you can just look at the file extension - if it is   
   ".txt", it's a text file, otherwise it's a binary file.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca