Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Not sure if a Bug

1 view
Skip to first unread message

Erand Mulla

unread,
Dec 11, 2019, 1:23:57 PM12/11/19
to bug-gn...@gnu.org, Freddy Lopez
Hello,

Does grep not work on Unicode files? Please find a sample file attached for which I could not get grep to work. Not sure if I am missing an option.

Best reagrds,
Erand Mulla
International Economic Database Manager
Haver Analytics
60 E 42nd St, 33rd Fl
New York, NY 10165
Tel: 1-212-986-9300

Unicode.txt

John Cowan

unread,
Dec 11, 2019, 1:35:16 PM12/11/19
to Erand Mulla, bug-gn...@gnu.org, Freddy Lopez
It's a UTF-16 file, probably created on Windows, and your locale doesn't
use UTF-16 (nobody does). Use this pipeline:

iconv -f UTF-16 Unicode.txt | grep 'COL#4'

Erand Mulla

unread,
Dec 11, 2019, 1:52:05 PM12/11/19
to John Cowan, bug-gn...@gnu.org, Freddy Lopez
Thanks a lot John!

Best,
Erand

From: John Cowan <co...@ccil.org>
Sent: Wednesday, December 11, 2019 1:35 PM
To: Erand Mulla <er...@haver.com>
Cc: bug-gn...@gnu.org; Freddy Lopez <fre...@haver.com>
Subject: Re: Not sure if a Bug

It's a UTF-16 file, probably created on Windows, and your locale doesn't use UTF-16 (nobody does). Use this pipeline:

iconv -f UTF-16 Unicode.txt | grep 'COL#4'

0 new messages