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 "A".

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
add comment

2 Answers

up vote 1 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
add comment

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
add comment

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.