Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在windows中重定向文本并获取utf-8?_Windows_Powershell_Svn_Utf 8_Utf 16 - Fatal编程技术网

如何在windows中重定向文本并获取utf-8?

如何在windows中重定向文本并获取utf-8?,windows,powershell,svn,utf-8,utf-16,Windows,Powershell,Svn,Utf 8,Utf 16,如果我将powershell中的程序(在我的例子中是svn)的输出重定向到一个文件,则输出为UTF-16。我可以换成UTF-8吗?如何实现?在获得UTF-16输出后,您可以将其转换为UTF-8吗?答案是可以做到的 你案例中有意义的部分是 Set-Content -Encoding UTF8 目前如何重定向输出?通过操作员,通过管道传输到输出文件,以其他方式?@vonPryz Just>@StefanoBorini使用您想要的编码。默认值为UTF16。Windows字符串为UTF16,因此默认设

如果我将powershell中的程序(在我的例子中是svn)的输出重定向到一个文件,则输出为UTF-16。我可以换成UTF-8吗?如何实现?

在获得UTF-16输出后,您可以将其转换为UTF-8吗?答案是可以做到的

你案例中有意义的部分是

Set-Content -Encoding UTF8

目前如何重定向输出?通过
操作员,通过管道传输到
输出文件
,以其他方式?@vonPryz Just>@StefanoBorini使用您想要的编码。默认值为UTF16。Windows字符串为UTF16,因此默认设置为sense@PanagiotisKanavos有没有办法将>默认设置为utf-8?@StefanoBorini查看帮助页面。它解释了重定向选项和操作符