cat /path/to/example.log | LANG=C grep -n -v '^[[:cntrl:][:print:]]*$' | head
zless /var/log/td-agent/td-agent.log ... 2021-08-01 01:02:03 +0000 [info]: spawn command to main: cmdline=["/opt/td-agent/embedded/bin/ruby", "-Eascii-8bit:ascii-8bit", "/opt/td-agent/embedded/bin/fluentd", "--log", "/var/log/td-agent/td-agent.log", "--daemon", "/var/run/td-agent/td-agent.pid", "--under-supervisor"]
<source> @type tail encoding UTF-8 from_encoding UTF-8 ... </source>
<match **> ... json_handler yajl # To avoid UndefinedConversionError ... </match>
<filter pattern> @type record_modifier # set UTF-8 encoding information to string. char_encoding utf-8 # change char encoding from 'UTF-8' to 'EUC-JP' char_encoding utf-8:euc-jp </filter>