Skip to content

Instantly share code, notes, and snippets.

@Gateswong
Created September 1, 2015 04:56
Show Gist options
  • Save Gateswong/f40c7c93b9548fed93e6 to your computer and use it in GitHub Desktop.
Save Gateswong/f40c7c93b9548fed93e6 to your computer and use it in GitHub Desktop.
Convert a file to utf8 encoding. Usage: To-UTF8.ps1 'encoding' 'infile' 'outfile'
[System.Text.Encoding]::GetEncoding($args[0]).GetString(
(type $args[1] -Encoding Byte)
) | Out-File $args[2] -Encoding utf8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment