How To grep UTF-16
[2009-04-07]grep won't work. Turns out your file is UTF-16 encoded. Now what?
Well, you know it's UTF-16 encoded because the "file" command tells you:
$ file myfile
myfile: Little-endian UTF-16 Unicode English character data
So you need to convert it. Here's how:
$ iconv -f utf-16 -t utf-8 myfile | grep needle
where "needle" is what you're looking for.
☙
