PowerShell设置UTF8字符编码

By admin, 20 八月, 2020

在PowerShell里运行mysql source一个SQL文件的时候可能会遇到编码问题。下面办法可解决:

PS C:\> $OutputEncoding = [System.Text.Encoding]::UTF8
PS C:\> [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
PS C:\> chcp 65001

参考:https://stackoverflow.com/questions/51933189/character-encoding-utf-8-in-powershell-session

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"