Discussion:
Not sure if a Bug
(too old to reply)
Erand Mulla
2019-12-11 15:55:06 UTC
Permalink
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
John Cowan
2019-12-11 18:34:58 UTC
Permalink
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'
Post by Erand Mulla
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
Erand Mulla
2019-12-11 18:51:56 UTC
Permalink
Thanks a lot John!

Best,
Erand

From: John Cowan <***@ccil.org>
Sent: Wednesday, December 11, 2019 1:35 PM
To: Erand Mulla <***@haver.com>
Cc: bug-gnu-***@gnu.org; Freddy Lopez <***@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'

On Wed, Dec 11, 2019 at 1:23 PM Erand Mulla <***@haver.com<mailto:***@haver.com>> wrote:
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

Continue reading on narkive:
Loading...