PowerShell 重定向写出中文乱码

命令行难度 2/5约 2 分钟

用 Out-File 或 > 生成的中文文件被其它程序读成乱码,原因是 Windows PowerShell 默认不写 UTF-8。