Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I do a tree > somefile.txt the file indeed contains the output of the tree command, but the lines drawn in the console are displayed as accented letters ÃÄÄÄ.

Which encoding or mode do I have to use to display such an output file correctly and which editor can do it?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

treesupports the /a switch which uses regular ASCII:

D:\>tree /a
Folder PATH listing for volume Win7
Volume serial number is BA60-7CCB
D:.
+---3rd
|   +---Android
|   |   +---android-ndk-r5
|   |   |   +---build
|   |   |   |   +---awk
|   |   |   |   +---core
|   |   |   |   +---gmsl
|   |   |   |   \---tools
share|improve this answer

It probably uses the line-drawing characters in code page 850.

Notepad doesn't support that encoding, it's default is "ANSI", by which Microsoft mean Windows-Latin1 or Code-Page-1252 if I remember correctly.

Notepad++ or gVim etc should be able to display the characters correctly.

share|improve this answer
    
gVim defaults to latin1, but the command :set enc=cp850 will fix it. –  Kevin Panko Sep 17 at 12:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.