GNU bug report logs - #28255
grep erroneously skips Microsoft UTF-8 text files as being binary

Previous Next

Package: grep;

Reported by: Simon <ixlr82c <at> teksavvy.com>

Date: Sun, 27 Aug 2017 21:24:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 28255 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Simon <ixlr82c <at> teksavvy.com>, 28255 <at> debbugs.gnu.org
Subject: Re: bug#28255: grep erroneously skips Microsoft UTF-8 text files as
 being binary
Date: Sun, 27 Aug 2017 14:47:28 -0700
Simon wrote:
> Windows text files can start with a byte order mark of U+FEFF and then
> be encoded in UTF-8.  These are skipped as being binary files.

I can't reproduce this problem on Fedora 26 x86-64. Here's how I tried:

$ printf '\357\273\277x\n' >t
$ LC_ALL=C grep x t | od -c
0000000 357 273 277   x  \n
0000005

To help us diagnose the problem, please send a simple, self-contained example, 
and mention your platform.




This bug report was last modified 5 years and 140 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.