Remove Special Characters from Import-Csv

Hello

I have a reporting system that generates a csv file that I need to import into powershell.

While looking at the file it looks fine , But using import-csv some "special character " is detected in of of the proprieties. Is there anyway to remove this character : �

here is the output
Classification : CMS/NBS � Report � Revision

it should be

Classification : CMS/NBS » Report – Revision

One option would be to replace the characters:

$Content = Get-Content -Path C:\My\test.csv
$Content = $Content.Replace('»','>').Replace('–','-')
$Csv = ConvertFrom-Csv -InputObject $Content
$Csv

Those are extended characters, not ASCII, which is probably causing the problem. You might try using -Encoding to specify the type of encoding (since it isn’t ASCII) that the file was created in. For example, “-Encoding UTF8,” if that’s what was used to create the file.

Thanks Guys. -Encoding was the issue.