我有一个PowerShell脚本。
它执行exe文件,该文件会产生UTF-16输出并且我正在使用以下方式将其导入到Select-String中:
& "my.exe" | Select-String -Pattern "skipping non-regular file" -NotMatch -Encoding "utf-16"
但PowerShell报告说,该编码不受支持。
有没有解决方法?UTF-16真的不被支持吗?
Unicode
,而不是utf-16
。 - Jeroen Mostert