Sometimes you can have the problem that you cannot 'grep' files in Linux, if those files are generated on a Windows station.
If you check the file type, by typing "file [filename]", you can see the following output:
Little-endian UTF-16 Unicode text, with CRLF line terminators
Then you can use the following command to convert the file to utf-8:
iconv -f utf-16 -t utf-8 [filename] > [new_filename]
after that you can stilll convert it to Unix if you want. (dos2unix or fromdos)
原文地址: http://schelstraete.org/index.php/linux/608-convert-little-endian-utf-16-unicode-text-with-crlf-line-terminators