如何从PowerShell echo输出禁用Unicode BOM?


0

我想使用echoPowerShell 编写一些简短的配置文件,但不幸的是,默认情况下,在文件的开头创建了一个领先的Unicode BOM。这打破了像pip这样尚未学会忽略BOM的应用程序。是否有标志或环境变量或类似的来自发出BOM的diable echo?


啊,希望stackoverflow.com/a/48859679/350106工作,管道[Text.Encoding] :: UTF8.GetBytes(<string>)到Set-Content -Encoding Byte <file>
mcandre
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.