Created
September 1, 2015 04:56
-
-
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'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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