On 3/27/2017 5:44 PM, Byron Sanchez wrote:
I'm tracking several plain-text files in a repository. These are emacs org-mode files.

Fossil sees most of the files in this repo as normal plain-text files and as such, they can be diffed via the fossil web interface.

Recently, however, fossil has started interpreting one of these org-mode files as a binary file. Now, fossil prompts with it's binary-file warning each time I update the file. In addition, this file can no longer be diffed in the web interface, since fossil believes it to be a binary file.

I'm wondering what steps I should take to debug this, or if there are any common causes for this sort of thing? Very long lines perhaps or possibly unicode characters?

Try the command "fossil test-looks-like-utf" to see the conditions that fossil tests for your file. That should help narrow down what to look for in the file that caused it to suddenly smell binary. It usually decides a file is binary if it has a line that is "too long", or has a NUL byte and is not UTF-16.

I believe that a line is too long if it is more than about 8191 ASCII characters, a restriction based on the size of the buffer used in the diff engine.

The other thing that can happen is to accidentally save a text file in an encoding other than UTF-8, with some character not included in the base 7-bit ASCII set. In my experience this was usually some accented letter from LATIN1, or a symbol such as 'µ' or '°'. Your editor will likely calmly edit and save the file, everything looks fine, but the saved file has bytes that make an invalid UTF-8 sequence. That does have a different warning message than binary data (likely "invalid UTF-8") so isn't your problem with this file.

The file in question is about 3.3 megabytes in size, and as far as I am aware, a normal plain-text org-mode file.

Any ideas would be very appreciated!


--
Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to