开发者

Powershell: Get default system encoding

开发者 https://www.devze.com 2023-02-17 17:21 出处:网络
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.

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?


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号