且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

不带BOM的UTF8编码-PowerShell

更新时间:2023-11-27 17:49:04

我找到了解决方案. 只需更改此行:

I found the solution. Just change the line with this:

powershell -Command "&{ param($Path); $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding($False); $MyFile = Get-Content $Path; [System.IO.File]::WriteAllLines($Path, $MyFile, $Utf8NoBomEncoding) }" CSVs\\pass.csv