The powershell cmdlet out-file
has the switch -encoding
witch you can set to default
. This default value will use the encoding of the system's current ANSI code page.
My question is: How can I get the name of this default encoding that out-file
will use with powershell?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Take a look at [System.Text.Encoding]::Default
, I believe it is used as "default".
E.g. in my case:
[System.Text.Encoding]::Default.EncodingName
gets
Cyrillic (Windows)