The easiest way is to just convert the text file to utf-8 and pipe that to grep:
iconv -f utf-16 -t utf-8 file.txt | grep query
The operational attributes contained in an entry can be returned by ldapsearch by:
Explicitly listing them
ldapsearch -x -h host:port -b c=au "(oc=*)" createTimestamp modifyTimestamp
Or by returning all of them with the special + character
ldapsearch -x -h host:port -b c=au "(oc=*)" +
Or all attributes including operational attributes can be returned by including "*" +
ldapsearch -x -h host:port -b c=au "(oc=*)" "*" +
%{VARNAME}o The contents of VARNAME: header line(s) in the reply.
%{VARNAME}i The contents of VARNAME: header line(s) in the request sent to the server.