-
-
Save vegetaz/91a144bf6599774e3e0939b45cc53024 to your computer and use it in GitHub Desktop.
Convert all files to UTF-8 using powershell
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
Param ( | |
[Parameter(Mandatory=$True)][String]$SourcePath | |
) | |
Get-ChildItem $SourcePath\* -recurse -Include *.json,*.html,*.xml,*.js,*.txt,*.css | ForEach-Object { | |
$content = $_ | Get-Content | |
Set-Content -PassThru $_.Fullname $content -Encoding UTF8 -Force} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment