Vimmers,
I have a problem with grep and thought I'd run the question by this list
hoping someone knows about it. Sorry for the off-topicness.
I have some files. They open OK with vim. The status shows
[converted][dos]
In vim I search for, e.g. "RFP" and I can find it.
But in the shell, if I do
grep RFP file.txt (grep or egrep)
grep does not return anything.
I opened a new text file with vim, and read in the problematic file, and
saved it. Grep works on that new file from vim.
I saved the problem file from vim. Grep still fails.
Diff returns something like this:
Binary files problem-file.txt and new-file.txt differ
And when I run "file", the new-file.txt is ASCII, and the problem-file.txt
is
Little-endian UTF-16 Unicode character data
I might have quite a few of this type of files. I guess I can run iconv,
but does anyone know how I can let "grep" work with those files without
running iconv? Or an alternative to grep?
(Sure iconv --from-code UTF-16 --to-code ASCII fixes the problem but I'd
like to keep the original timestamp and all.)
Thanks.
Ben Kim
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---