Created
July 30, 2019 12:38
-
-
Save Elnee/cd3d113b44c6aa7b131f81b717dd8d77 to your computer and use it in GitHub Desktop.
PowerShell script for convert all cpp and h files in your folder to utf8
This file contains hidden or 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
| Set-Location -Path D:\Projects\SomeProject # Path to your sources | |
| foreach ($file in Get-ChildItem) | |
| { | |
| if ($file -like "*.cpp" -or $file -like "*.h") { | |
| Write-Host "Processing " -ForegroundColor Red -NoNewline | |
| Write-Host $file | |
| Set-Content -Encoding UTF8 -Path $file -Value (Get-Content $file) | |
| } | |
| } | |
| Write-Host "All files has been recoded" -ForegroundColor Green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment