On Tue, Sep 4, 2018 at 2:08 AM Richard Simões <[email protected]> wrote:
> Can you confirm that my suggested hack with explicit Perl invocation and >> IO code injection works with ack and your BOM-UTF-16 data? >> > > With Perl 5.26 and ack 2.18: > > $ perl -C '-Mopen IO=>":encoding(UTF-16LE)"' /usr/local/bin/ack --noenv > test > UTF-16LE:Partial character at /usr/local/bin/ack line 525. > UTF-16LE:Partial character at /usr/local/bin/ack line 525. > UTF-16LE:Partial character at /usr/local/bin/ack line 543, <__ANONIO__> > line 1. > > I'm shocked, shocked that an MS App writes a naughty character in UTF-16. (Pleasantly surprised you didn't get bad surrogate pair warnings.) Guessing they've not UTF-16LE encoded the trailing Ctrl-Z EOF ? (Confusingly in UTF-16LE, EOF should be ^Z \000 . Any app not doing UTF should treat as Binary and ignore ^Z !) If you *2>/dev/null*, to mask the noise, and search for a word that appears in the files, do you get sensible results ? -- You received this message because you are subscribed to the Google Groups "ack users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/ack-users. For more options, visit https://groups.google.com/d/optout.
