On 11/5/15, sky5w...@gmail.com <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 user define the valid range.

Please send me the actual file that is causing problems.

>
> By the way, Notepad, Notepad++, Visual Studio, etc. have identical
> renderings for these characters and consider the file ansi text.
>
> On Thu, Nov 5, 2015 at 4:31 PM, Stephan Beal <sgb...@googlemail.com> wrote:
>
>> On Thu, Nov 5, 2015 at 9:52 PM, <sky5w...@gmail.com> 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
>> 0000000 457f 464c 0102 0001 0000 0000 0000 0000
>> 0000010 0002 003e 0001 0000 7be2 0040 0000 0000
>> 0000020 0040 0000 0000 0000 0b38 0094 0000 0000
>> 0000030 0000 0000 0040 0038 0009 0040 0025 0022
>> 0000040 0006 0000 0005 0000 0040 0000 0000 0000
>> 0000050 0040 0040 0000 0000 0040 0040 0000 0000
>> 0000060 01f8 0000 0000 0000 01f8 0000 0000 0000
>> 0000070 0008 0000 0000 0000 0003 0000 0004 0000
>> 0000080 0238 0000 0000 0000 0238 0040 0000 0000
>> 0000090 0238 0040 0000 0000 001c 0000 0000 0000
>>
>> (Assumption: that's "probably" typical of a typical binary file.)
>>
>> i see only 2 bytes there which are >127d (specifically, 0xf8 and 0xe2),
>> and lots below 32d. Plus i see a few 6's and 2's. i think it's
>> unreasonable
>> (=highly unconventional) to expect fossil to treat those bytes as "text."
>> 0x02 is, according to my local man pages, the "start of text" (control)
>> character, which places it implicitly outside the range of bytes used by
>> "text."
>>
>> --
>> ----- stephan beal
>> http://wanderinghorse.net/home/stephan/
>> http://gplus.to/sgbeal
>> "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
>> those who insist on a perfect world, freedom will have to do." -- Bigby
>> Wolf
>>
>> _______________________________________________
>> fossil-users mailing list
>> fossil-users@lists.fossil-scm.org
>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>>
>>
>


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
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