grep does not work for UTF-16 files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grep (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grep
Release:
Description: Ubuntu 9.04
Release: 9.04
Package:
grep:
Installed: 2.5.3~dfsg-6ubuntu1
Candidate: 2.5.3~dfsg-6ubuntu1
Version table:
*** 2.5.3~dfsg-6ubuntu1 0
500 http://
100 /var/lib/
When grep-ing a UTF-16 file, I expected results for the search pattern I was using. However, no matches were found (using grep without options and 'grep -hi').
I am not sure what program initially created the file as I received them via email from a Windows user. I have attached part of the file for testing (I have gzipped the file to reduce any risk of the browser mangling it). 'file' returns the filetype as 'Little-endian UTF-16 Unicode character data, with CRLF, CR line terminators'. I have attached a gzip extract of the file (just the first ten lines returned from 'head').
Other text utilities such as cat, less, head, tail and vim have no problem dealing with the file. So far as I have found, only grep cannot handle the file.
Affects 10.04 release too.