:: [DNG] grep handles ISO-8859 encoded…
Top Page
Delete this message
Reply to this message
Author: Hughe Chung
To: dng
Subject: [DNG] grep handles ISO-8859 encoded text file as binary file.

I got to use -a option to search words on C code files.

$ grep tesselate dome_math.c
Binary file dome_math.c matches

$ file *.c
3ds_utils.c: C source, ISO-8859 text
dome_3ds.c: C source, ASCII text
dome.c: C source, ASCII text
dome_cover.c: C source, ASCII text
dome_file.c: C source, ASCII text
dome_layout.c: C source, ASCII text
dome_math.c: C source, ISO-8859 text
dome_struts.c: C source, ASCII text
main.c: C source, ASCII text
utils.c: C source, ASCII text

$ grep -a tesselate dome_math.c
static void tesselate1(const Dome *in, Face face, int f, Dome *out,
tesselate(const Dome *in, Dome *out, int f)
tesselate1(in, in->faces[i], f, out, &fcount, could not be a binary
file. &vcount, &ecount);
tesselate1(const Dome *in, Face face, int f, Dome *out,
fprintf(stderr, “Internal error: out of faces in tesselate\n”);
fprintf(stderr, “Internal error: out of vertices in tesselate\n”);

There was a bug report.