help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking if a file is binary (non-textual)


From: Nordlöw
Subject: Checking if a file is binary (non-textual)
Date: Mon, 28 Sep 2009 06:29:28 -0700 (PDT)
User-agent: G2/1.0

What characters (bytes) should *not* be present in a text-file that
may contain variable-length unicode characters.
What does the unicode standard say about this?

The reason for asking:
I am working on a tool that unifies grep, tags-query-replace, occur,
etc.
And I really would like this tool to have some clever default
behaviour for determining how to present the search (grep) hit-context
for different file-types:
- textual files: show whole line (as grep and occur does)
- binary files: either no context just notify match (like grep) or
maybe all [a-zA-Z0-9_]* directly before or after hit
- ...

/Nordlöw


reply via email to

[Prev in Thread] Current Thread [Next in Thread]