Monday, February 20, 2017

Change files' encoding recursively on Windows

Get-ChildItem *.txt -Recurse | ForEach-Object {
$content = $_ | Get-Content

Set-Content -PassThru $_.Fullname $content -Encoding UTF8 -Force}  

from: http://stackoverflow.com/questions/1681568/change-files-encoding-recursively-on-windows