[Console]::OutputEncoding = [Text.Encoding]::UTF8 $raw = [IO.File]::ReadAllBytes("$env:TEMP\opencode\fix1.tsv") $text = if ($raw[0] -eq 0xFF -and $raw[1] -eq 0xFE) { [Text.Encoding]::Unicode.GetString($raw) } else { [Text.Encoding]::UTF8.GetString($raw) } $lines = $text -split "`r?`n" foreach ($l in $lines) { $p = $l -split "`t" if ($p.Count -lt 5 -or -not $p[4]) { continue } $h = $p[4] -replace " ", "" if ($h.Length -lt 100) { continue } if ($h.Substring(0x28 * 2, 8) -eq "41454348") { Write-Host ("AECH t={0,9} src={1} len={2}" -f $p[0], $p[1], ($h.Length/2)) } if ($h.Substring(0x28 * 2, 8) -eq "41455245") { Write-Host ("AERE t={0,9} src={1} len={2} c0={3}" -f $p[0], $p[1], ($h.Length/2), $h.Substring(0xC0*2,8)) } }