From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Checking if a file is binary (non-textual)
Date: Mon, 28 Sep 2009 06:29:28 -0700 (PDT) [thread overview]
Message-ID: <3dcc7253-dbfc-431c-ac56-1c34bc7798ad@a6g2000vbp.googlegroups.com> (raw)
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
next reply other threads:[~2009-09-28 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-28 13:29 Nordlöw [this message]
2009-09-28 14:34 ` Checking if a file is binary (non-textual) Jeff Clough
2009-09-28 15:49 ` Eli Zaretskii
2009-09-28 16:50 ` Jeff Clough
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3dcc7253-dbfc-431c-ac56-1c34bc7798ad@a6g2000vbp.googlegroups.com \
--to=per.nordlow@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.