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,616 of 243,242   
   Lawrence =?iso-8859-13?q?D=FFOlivei to Bonita Montero   
   Re: is_binary_file()   
   27 Dec 25 05:51:13   
   
   From: ldo@nz.invalid   
      
   On Mon, 8 Dec 2025 13:51:49 +0100, Bonita Montero wrote:   
      
   > From the glibc Reference Manual:   
   >   
   > “The distinction between text and binary streams is only meaningful   
   > on systems where text files have a different internal   
   > representation. On Unix systems, there is no difference between the   
   > two; the ‘b’ is accepted but ignored.”   
      
   However, you need to distinguish the two if you want, like Python   
   does, to be able to have a “universal newline” mode, where you can   
   correctly handle line breaks in files written on any of the three main   
   platform families: *nix/Unix, Windows, and macOS.   
      
   This is such a useful idea I’m surprised no one has suggested that C   
   should offer the option.   
      
   --- 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