Note that there are some explanatory texts on larger screens.

plurals
  1. POSaving 'tree /f /a" results to a textfile with unicode support
    text
    copied!<p>I'm trying to use the tree command in a windows commandline to generate a text file listing the contents of a directory but when I pipe the output the unicode characters get stuffed up.</p> <p>Here is the command I am using:</p> <pre><code>tree /f /a &gt; output.txt </code></pre> <p>The results in the console window are fine:</p> <pre> \---Erika szobája cover.jpg Erika szobája.m3u Kátai Tamás - 01 Télvíz.ogg Kátai Tamás - 02 Zölderdõ.ogg Kátai Tamás - 03 Renoir kertje.ogg Kátai Tamás - 04 Esõben szaladtál.ogg Kátai Tamás - 05 Ázik az út.ogg Kátai Tamás - 06 Sûrû völgyek takaród.ogg Kátai Tamás - 07 Õszhozó.ogg Kátai Tamás - 08 Mécsvilág.ogg Kátai Tamás - 09 Zúzmara.ogg </pre> <p>But the text file is no good:</p> <pre> \---Erika szob ja cover.jpg Erika szob ja.m3u K tai Tam s - 01 T‚lv¡z.ogg K tai Tam s - 02 Z”lderdä.ogg K tai Tam s - 03 Renoir kertje.ogg K tai Tam s - 04 Esäben szaladt l.ogg K tai Tam s - 05 µzik az £t.ogg K tai Tam s - 06 S–r– v”lgyek takar¢d.ogg K tai Tam s - 07 åszhoz¢.ogg K tai Tam s - 08 M‚csvil g.ogg K tai Tam s - 09 Z£zmara.ogg </pre> <p>How can I fix this? Ideally the text file would be exactly the same as the output in the console window.</p> <p>I tried Chris Jester-Young's suggestion (what happened, did you delete it Chris?) of running the command line with the /U switch, it looked like exactly what I needed but it does not appear to work. I have tried opening the file in both VS2008 and notepad and both show the same incorrect characters.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload