Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-06 Thread Jan Nijtmans
2015-11-06 2:12 GMT+01:00 Richard Hipp: > Offending code is here: > https://www.fossil-scm.org/fossil/artifact/10cb5eb292?ln=40-43 > > I guess sky5walk wants that to allow through any characters other than > 0x00 My guess is that the code in doc.c was written when the function

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-06 Thread sky5walk
Thanks for the fix! I will try to compile it when I get a spare moment...which is in short supply. On Fri, Nov 6, 2015 at 3:16 AM, Jan Nijtmans wrote: > 2015-11-06 2:12 GMT+01:00 Richard Hipp: > > Offending code is here: > >

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Warren Young
On Nov 5, 2015, at 11:37 AM, sky5w...@gmail.com wrote: > > I am also trapped with this binary file detection for the egregious use of > ascii characters 2 and 6 in my code. :( What does “fossil test-looks-like-utf filename” say for that file? ___

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread sky5walk
No, I just deleted ascii characters 2 and 6 from the file and Fossil now shows the file as text. I will have to build this ascii string in code instead of pasting from hex editor. But, it would be cool to set a range of acceptable ascii characters = text. Ex. ascii 1-127 = text. On Thu, Nov 5,

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Jan Nijtmans
2015-11-05 19:37 GMT+01:00 : > Hi, > I am also trapped with this binary file detection for the egregious use of > ascii characters 2 and 6 in my code. :( > > ;// ascii2+sometexthere+ascii6 > ;//sometexthere ;<-- pasting here does not show the prefix and suffix > ascii

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread sky5walk
No, saving the file to utf-8 + BOM did not prompt Fossil to trigger text. And "decent" is a relative term. ;// Temp Tol ±°C ;<-- Ansi display :) ;// Temp Tol [xB1][xB0]C ;<-- UTF-8+BOM display :( On Thu, Nov 5, 2015 at 5:43 PM, wrote: > Thanks for looking at this. >

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread sky5walk
Haha, it would be quite a mess if $ and @ triggered binary. I see no reason to kick the file to binary if the ascii code < 128? On Thu, Nov 5, 2015 at 3:46 PM, wrote: > No difference besides num bytes with or without the embedded Ascii > characters 2 and 6. > I add this 1

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Scott Robison
On Thu, Nov 5, 2015 at 3:09 PM, wrote: > Well, I have a workaround(no pasted literal strings). I just didn't > realize Ascii characters within 1-255 could trigger binary? > > Maybe a fast histogram, and a count of << 1 or 2% for these ascii > characters allows text. Or let

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Warren Young
On Nov 5, 2015, at 3:54 PM, sky5w...@gmail.com wrote: > > And "decent" is a relative term. No, it’s a value judgment. I judge that a text editor that can’t handle UTF-8 is indecent. :) > ;// Temp Tol ±°C ;<-- Ansi display :) > ;// Temp Tol [xB1][xB0]C ;<-- UTF-8+BOM display :( That

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread sky5walk
Yes yes, I am painfully aware of the BOM and the encoding steps. Notepad++ has a simple menu click for this. Despite all combinations, Fossil considers the file binary. On Thu, Nov 5, 2015 at 6:33 PM, Warren Young wrote: > On Nov 5, 2015, at 3:54 PM, sky5w...@gmail.com wrote:

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Richard Hipp
On 11/5/15, sky5w...@gmail.com wrote: > Hi, > I am also trapped with this binary file detection for the egregious use of > ascii characters 2 and 6 in my code. :( > > ;// ascii2+sometexthere+ascii6 > ;//sometexthere ;<-- pasting here does not show the prefix and suffix >

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread sky5walk
Hi Dr Hipp, I also sent you "try2.fossil" with the offending file inside. In that repo, I toggled binary-glob settings with no changes to the file classification as binary. You are correct, the diff works for the tiny example file, but not if you try to view the entire file from the ui:

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Stephan Beal
On Thu, Nov 5, 2015 at 9:52 PM, wrote: > Haha, it would be quite a mess if $ and @ triggered binary. > I see no reason to kick the file to binary if the ascii code < 128? > fwiw... [stephan@host:~/bin]$ hexdump fossil | head 000 457f 464c 0102 0001

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread sky5walk
Well, I have a workaround(no pasted literal strings). I just didn't realize Ascii characters within 1-255 could trigger binary? Maybe a fast histogram, and a count of << 1 or 2% for these ascii characters allows text. Or let the user define the valid range. By the way, Notepad, Notepad++, Visual

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Scott Robison
On Thu, Nov 5, 2015 at 12:16 PM, Jan Nijtmans wrote: > 2015-11-05 19:37 GMT+01:00 : > > Hi, > > I am also trapped with this binary file detection for the egregious use > of > > ascii characters 2 and 6 in my code. :( > > > > ;//

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Richard Hipp
On 11/5/15, sky5w...@gmail.com wrote: > Well, I have a workaround(no pasted literal strings). I just didn't realize > Ascii characters within 1-255 could trigger binary? > > Maybe a fast histogram, and a count of << 1 or 2% for these ascii > characters allows text. Or let the

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Scott Robison
On Thu, Nov 5, 2015 at 1:52 PM, wrote: > Haha, it would be quite a mess if $ and @ triggered binary. > I see no reason to kick the file to binary if the ascii code < 128? > Not an unreasonable point of view, but the question becomes: How do you render character codes less

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread sky5walk
No difference besides num bytes with or without the embedded Ascii characters 2 and 6. I add this 1 line to my file and it triggers binary?! [Asc2]+"123"+[Asc6][CR+LF] c:\tryfossil>fossil test-looks-like-utf myfile.txt File "myfile.txt" has 121343 bytes. Starts with UTF-8 BOM: no Starts with

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Richard Hipp
On 11/5/15, Richard Hipp wrote: > On 11/5/15, sky5w...@gmail.com wrote: >> Hi Dr Hipp, I also sent you "try2.fossil" with the offending file inside. >> In that repo, I toggled binary-glob settings with no changes to the file >> classification as binary. >>

Re: [fossil-users] source code file is considered by fossil to be binary.

2015-11-05 Thread Richard Hipp
On 11/5/15, sky5w...@gmail.com wrote: > Hi Dr Hipp, I also sent you "try2.fossil" with the offending file inside. > In that repo, I toggled binary-glob settings with no changes to the file > classification as binary. > You are correct, the diff works for the tiny example file,

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread Stephan Beal
On Sun, Jun 24, 2012 at 5:26 PM, James Bremner ravenspo...@yahoo.comwrote: 2. Can I persuade fossil that this file is really text? Can you try to re-commit a clean copy on top of it? i won't swear that will work, but it might be worth a try. -- - stephan beal

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread Richard Hipp
On Sun, Jun 24, 2012 at 11:26 AM, James Bremner ravenspo...@yahoo.comwrote: One of my source code files is considered by fossil to be binary. Artifact 9c62b051e82f735a46a249047a2b02374247e991 File unit_test/unit_test.cpp 2012-06-22 20:53:14 - part of checkin [a68d8947a6] on branch trunk -

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread James Bremner
On Sun, Jun 24, 2012 at 5:26 PM, James Bremner ravenspoint- /e1597as9lqavxtiumw...@public.gmane.org wrote: 2.  Can I persuade fossil that this file is really text? Can you try to re-commit a clean copy on top of it? i won't swear that will work, but it might be worth a try. -- -

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread James Bremner
Richard Hipp drh@... writes: 1.  Why did this happen? Your file either contains a \000 character, or else it has a single line of text that is longer than 8191 characters.  The longest line is 96 characters. I am not sure how to confirm there is no \000 character 2.  Can I

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread James Bremner
Your file either contains a \000 character, or else it has a single line of text that is longer than 8191 characters.  The longest line is less than 100 chars. I wrote a quick program to check for null characters - there do not seem to be any. ( code below ) It is definitely something

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread Richard Hipp
On Sun, Jun 24, 2012 at 11:26 AM, James Bremner ravenspo...@yahoo.comwrote: One of my source code files is considered by fossil to be binary. Artifact 9c62b051e82f735a46a249047a2b02374247e991 File unit_test/unit_test.cpp 2012-06-22 20:53:14 - part of checkin [a68d8947a6] on branch trunk -

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread James Bremner
Richard Hipp drh@... writes: Can you please show me the command that is failing for you.   If possible, please send me a copy of the file that Fossil thinks is binary.  Thank you for your attention to this. I have sent an email with the file attached to d...@sqlite.org James

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread James Bremner
You can get the file from and see the command at https://chiselapp.com/user/ravenspoint/repository/test_binary_text/dir?ci=tip James ___ fossil-users mailing list fossil-users@lists.fossil-scm.org

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread Richard Hipp
On Sun, Jun 24, 2012 at 4:14 PM, James Bremner ravenspo...@yahoo.comwrote: Thank you for your attention to this. I have sent an email with the file attached to Thanks for sending the file. The diff logic determines binary as I described previously: Files that do not contain \000 and with

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread James Bremner
Richard Hipp drh@... writes:   In your case there is a Ctrl-B (ascii 0x02) in the 2150th byte of the file, which makes Fossil think it is a binary file. Thank you for clarifying this mystery. FYI: ascii 0x02 is STX = Start of Text It is used by many devices that communicate over RS232 to

Re: [fossil-users] source code file is considered by fossil to be binary.

2012-06-24 Thread Scott Robison
It might be better (more portable) to escape those as octal or hex sequences (like '\002' or '\x02'). On Jun 24, 2012 3:11 PM, James Bremner ravenspo...@yahoo.com wrote: Richard Hipp drh@... writes: In your case there is a Ctrl-B (ascii 0x02) in the 2150th byte of the file, which makes