相关疑难解决方法(0)

输出中每个其他字符之间的NUL字节

我正在使用Ruby来读取然后将文件打印到stdout,将输出重定向到Windows PowerShell中的文件.

但是,当我检查文件时,我得到了输入:

PS D:> head -n 1 .\inputfile
<text id="http://observer.guardian.co.uk/osm/story/0,,1009777,00.html">         <s>             Hooligans       NNS     hooligan
                ,       ,       ,               unbridled       JJ      unbridled               passion NN      passion
-       :       -               and     CC      and             no      DT      no              executive       JJ      executiv
e               boxes   NNS     box             .       SENT    .               </s>
Run Code Online (Sandbox Code Playgroud)

......但这对于输出:

PS D:> head -n 1 .\outputfile
ÿ_< t e x t   i d = " h t t p : / / o b s e r v e r . g u a r …
Run Code Online (Sandbox Code Playgroud)

powershell encoding

11
推荐指数
1
解决办法
1万
查看次数

标签 统计

encoding ×1

powershell ×1