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,633 of 243,242   
   Waldek Hebisch to Paul   
   Re: is_binary_file()   
   28 Dec 25 05:46:34   
   
   From: antispam@fricas.org   
      
   Paul  wrote:   
   > On Fri, 12/26/2025 10:13 PM, Lawrence D’Oliveiro wrote:   
   >> On Sun, 7 Dec 2025 19:01:02 +0000, Richard Harnden wrote:   
   >>   
   >>> A text file is supposed to end with a '\n'   
   >>   
   >> PDF files end with that. The object index comes at the end, and each   
   >> index entry is fixed in length and ends with \015\012.   
   >>   
   >> But the spec makes it very clear that PDF files are not supposed to be   
   >> treated as text files.   
   >>   
   >   
   > The best you can do, is for the PDF to be entirely text except for   
   > some bytes near the top (second line). It's not exactly clear what they do,   
   > but I've seen at least one document that misses the binary line. That   
   > binary-thing could be a hash over the document.   
      
   I did a little developement on PDF-s.  For debugging is is convenient   
   to have 100% printable form, such PDF-s are perfectly valid.  Adobe   
   encourages putting in a bunch of nonprintable characters to   
   discourage silly tools from "converting text encoding", which   
   would mangle PDF-s.   
      
   --   
                                 Waldek Hebisch   
      
   --- 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