Powershell: Find out what a character is in a string
<p>I have a problem where I am getting these space like characters in between each character when I import from csv. The easy work around for this is changing the csv encoding to ansi/ascii but this will only take when opening the file and saving as then specifying the encoding. I have tried: </p>

<p><code>(Get-Content -Path $path) | Out-file -FilePath $path -Encoding "ASCII"</code>)</p>

<p>Which at first I thought worked but it was because I had previously done the save as on the file and forgot about it. </p>

<p>The csv I am Importing looks like this before its imported.</p>

<p><code>C:\temp,C:\temp,17.2MB, 0</code></p>

<p>But when the csv is imported the space like characters get involved:</p>

<p><a href="https://i.stack.imgur.com/BxvU9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BxvU9.jpg" alt="Screen"></a></p>

<p>I dont know how well you can see it in that image but the text is:</p>

<p><code>C : \ t e m p, C : \ t e m p, 1 7 . 2 M B,  0</code></p>

<p>This space is stopping me from searching on my data.</p>

<p>Basically is there a way to find out what that character is so I can get rid of it? Or is there another way to change the encoding? </p>