Windows 8 为Windows 8应用程序将web应用程序文件转换为UTF-8

Windows 8 为Windows 8应用程序将web应用程序文件转换为UTF-8,windows-8,utf-8,Windows 8,Utf 8,似乎每次提交Windows 8应用程序时都会出现相同的UTF-8错误 是否有更快的方法将一批文件转换为UTF-8格式?您可以使用下面的PowerShell脚本将目录中的所有文件转换为UTF-8 $files = [IO.Directory]::GetFiles("C:\temp\files") foreach($file in $files) { $content = get-content -path $file $content | out-file $file

似乎每次提交Windows 8应用程序时都会出现相同的UTF-8错误


是否有更快的方法将一批文件转换为UTF-8格式?

您可以使用下面的PowerShell脚本将目录中的所有文件转换为UTF-8

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

您应该能够使用PowerShell ISE运行上述脚本,或者按照此操作。

实际的错误消息是什么?为什么不首先使用UTF-8创建文件?我使用的编辑器没有该设置。记事本和Visual Studio也可以将文件另存为UTF-8。