Convert XML latin1 to UTF-8 and other way around
<p>I am trying to convert an XML file from Latin1 to UTF-8 and the other way around.
I have been doing some tests, but I fail to succeed this. 
I'm using</p>

<pre><code>Get-Content C:\inputfile.xml | Set-Content -Encoding utf8 C:\outputfile.xml
</code></pre>

<p>But this is not converting anything. So I tried to give the encoding in the <code>Get-Content</code>, but Latin1 is not recognized in PowerShell (or that's what the error message is telling me).
What's the best way to get this?</p>