Powershell:获取默认系统编码 [英] Powershell: Get default system encoding
本文介绍了Powershell:获取默认系统编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
powershell cmdlet out-file
具有开关 -encoding
,您可以将其设置为 default
.此默认值将使用系统当前 ANSI 代码页的编码.
我的问题是:如何获得 out-file
将与 powershell 一起使用的默认编码的名称?
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?
推荐答案
看看[System.Text.Encoding]::Default
,我相信它是作为默认"使用的.
Take a look at [System.Text.Encoding]::Default
, I believe it is used as "default".
例如就我而言:
[System.Text.Encoding]::Default.EncodingName
得到
Cyrillic (Windows)
这篇关于Powershell:获取默认系统编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文