Re: [fossil-users] CR/NL warning in .pdf
On Sep 6, 2011, at 1:18 AM, Konstantin Khomoutov wrote: The problem is while PDF is considered to be a binary file (and it indeed usually contains compressed regions, it does contain ASCII header and footer (I think it's its PostScript heritage), so it can be considered to be a plain ASCII file by any tool which does not look for its special magic character sequence (in the first line of the header). Probably Fossil does not do that. That's a bit funny, because the pdf files contain a single \r\n ending not within a compressed region. Converting that to \n doesn't seem to break anything, but did I just kill a kitten? And the more important question: should we make fossil to treat all pdf files to be binary? Kind regards, Remigiusz Modrzejewski ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] CR/NL warning in .pdf
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/2011 11:33 AM, Remigiusz Modrzejewski wrote: On Sep 6, 2011, at 1:18 AM, Konstantin Khomoutov wrote: The problem is while PDF is considered to be a binary file (and it indeed usually contains compressed regions, it does contain ASCII header and footer (I think it's its PostScript heritage), so it can be considered to be a plain ASCII file by any tool which does not look for its special magic character sequence (in the first line of the header). Probably Fossil does not do that. That's a bit funny, because the pdf files contain a single \r\n ending not within a compressed region. Converting that to \n doesn't seem to break anything, but did I just kill a kitten? Yes. PDF files contain tables of contents that point to byte offsets within the file. Changing line endings like that removes a byte, which shifts everything. Some readers *may*, if a ToC entry points to something that doesn't look like what they expect, search about a bit to find the header. Some might not. Such PDF files are unreliable! And the more important question: should we make fossil to treat all pdf files to be binary? Yes. They are binary files. The fact that they contain lots of ASCII text is misleading - they can't be treated as text files. ABS - -- Alaric Snell-Pym http://www.snell-pym.org.uk/alaric/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5l96kACgkQRgz/WHNxCGpk/gCfcOkct8f1WdqYxbqnDtDTE1qB Fp0An2IjFOw5Yz5UvvTv1zt8PlCX3CHx =bIsi -END PGP SIGNATURE- ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] CR/NL warning in .pdf
Hi, I'm wondering if this warning is OK: ./storage/exp-queue6deads-rectime-N200-s8-r3-b1000-c1_2-upbw28-mtbf1440.pdf contains CR/NL line endings; commit anyhow (yes/no/all)? While committing in a recent trunk build. I just don't know what's the story behind line endings in PDF. Kind regards, Remigiusz Modrzejewski ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] CR/NL warning in .pdf
On Mon, Sep 05, 2011 at 07:26:37PM +0200, Remigiusz Modrzejewski wrote: I'm wondering if this warning is OK: ./storage/exp-queue6deads-rectime-N200-s8-r3-b1000-c1_2-upbw28-mtbf1440.pdf contains CR/NL line endings; commit anyhow (yes/no/all)? While committing in a recent trunk build. I just don't know what's the story behind line endings in PDF. The problem is while PDF is considered to be a binary file (and it indeed usually contains compressed regions, it does contain ASCII header and footer (I think it's its PostScript heritage), so it can be considered to be a plain ASCII file by any tool which does not look for its special magic character sequence (in the first line of the header). Probably Fossil does not do that. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users