Win10, the Cmd,power shell is set to the default encoding of ' UTF-8

Source: Internet
Author: User
Power Shell

Note: The following content is written on a non-Windows platform, there may be spelling errors, if any, please correct me, I will amend as soon as possible. It can be implemented using the PowerShell configuration file (\ Profile). \)The profile default file does not exist and needs to be created. New-item $PROFILE-itemtype File-force
A PS1 file is generated under the document that is loaded when the PowerShell is started. Add a sentence in this configuration file: [System.console]::outputencoding=[system.text.encoding]::getencoding (65001)
Of course, here's the question of PowerShell execution strategy (execution policy) that you need to set to allow PowerShell to execute the script, I'm using the unrestricted strategy: Set-executionpolicy Unrestricted

Cmd

In accordance with the original method to enter the "Chcp 65001" every time you open it, as long as the computer automatically enter this code every time you turn on it can be win+r------Computer \hkey_local_machine\software\ Microsoft\command Processor--Add a String value (name: Autorun data: chcp 65001)

Win10, the Cmd,power shell is set to the default encoding of ' UTF-8

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.