I wish to catch the invalid character inside a .csv file. Currently I only able catch all the invalid characters that are not English only, is there anyway to catch all invalid characters except English & Germany?
The following code is able to filter the invalid characters that is not English letters.
$path = "product.csv"
$a = Get-Content $path | Select-String -AllMatches -Pattern "[^\x00-\x79]" | Select-Object LineNumber,Line,@{Name='String';Expression={$_.Matches.Value}}
$b = $a.count
$a
Write-Host "Total: $b"
All Germany Characters that containing in People Name are counted as Valid Characters.