2

It seems like I get the same UTF-8 error every time I submit a Windows 8 app.

Is there a faster way to convert a batch of files to be UTF-8 formatted?

Blynn
  • 1,411
  • 7
  • 27
  • 48

1 Answers1

3

You can use PowerShell script below to convert all files in a directory to UTF-8.

$files = [IO.Directory]::GetFiles("C:\temp\files")
foreach($file in $files) 
{     
    $content = get-content -path $file
    $content | out-file $file -encoding utf8    
}  

You should be able to run the script above using PowerShell ISE or follow this instruction.

Community
  • 1
  • 1
kimsk
  • 2,221
  • 22
  • 23