home bbs files messages ]

Just a sample of the Echomail archive

COMPLANC:

<< oldest | < older | list | newer > | newest >> ]

 Message 242,415 of 243,097 
 Keith Thompson to Michael Sanders 
 Re: is_binary_file() 
 10 Dec 25 15:20:19 
 
From: Keith.S.Thompson+u@gmail.com

Michael Sanders  writes:
> On Tue, 09 Dec 2025 15:42:59 -0800, Keith Thompson wrote:
>
>> [...]
>
> Keith if you get a chance see my reply to Lew 'is_text_file()'
>
> Let me know if I've inched closer a step or two...

Closer to what exactly?

In the parent article, I suggested that you likely don't need to
determine whether a file is "text" or "binary".  You said you want
to parse a file.  An attempt to parse it will fail either if the
input is binary or if it's text that doesn't match the grammar you
require.   For example, a parser for C source code doesn't need to
check whether the input is binary or text.  Certain input
characters will simply cause the parse to fail, and a syntax error
can be reported.   Tell us more about how you want to parse files.
Are you parsing according to a formal grammar?  Or is it more
ad-hoc?

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

--- 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