如何在powershell中使用某種編碼讀取文本檔案?
我正在執行以下操作:
$text = [System.IO.File]::ReadAllLines("path.txt")
$text
但是我需要輸入 UTF8 編碼,我該怎么做呢?
uj5u.com熱心網友回復:
這應該這樣做:
[System.IO.File]::ReadAllLines("path.txt", [System.Text.Encoding]::UTF8)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/490725.html
上一篇:在命令列開關的另一個變數/引數中使用Powershell變數
下一篇:下載后洗掉FTP服務器檔案
