in reply to Can't find \x0D

Because you're working in binary mode, I would start by confirming the encoding of your file. In particular, if it is a Unicode representation, check whether it is a 8-bit or 16-bit encoding and byte-order.