grep bug where it stops on invalid UTF-8 input