I have a CSV file using different quote and text delimiter characters other than the default. I know for the delimiter there is an option for a different delimiter but I cannot find out how to get rid of the quote characters.
Import-Csv 'C:\test.txt' -Delimiter "(character U+0014 is used here, won't show here)"
But the quote character is the U+00FE and I need to remove this as well so I can get the text without any special characters. I do not want to write this out to a new file. I want to import the csv into a variable so I can do some analytic’s on it. For example see if a field is empty.
Any ideas?
The delimiter is not actually a problem, as you can do that with
As for the quotes you can use a preprocessing step and then use
ConvertFrom-instead ofImport-CSV:If your lines contain embedded quotes then it needs a bit more work and probably easier just to force-quote every field: