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.

Ubuntu 10.04's ls can show unicode characters, but tree cannot, even with tree --charset unicode or utf8. Is there a way to solve it. echo could interpret the escape characters except cat list.txt | echo -e won't work (list.txt comes from tree > list.txt)

Update: tree -H www.somewhere.com can output unicode (should be in UTF-8) but right now it seems this is the only way -- as a webpage.

$ ls -R
.:
list2.txt  list.txt  久未在遊行場合露面的前總統李登輝.txt  遊行

./遊行:
大家2.txt  大家.txt

$ tree --charset unicode
.
|-- list2.txt
|-- list.txt
|-- \344\271\205\346\234\252\345\234\250\351\201\212\350\241\214\345\240\264\345\220\210\351\234\262\351\235\242\347\232\204\345\211\215\347\270\275\347\265\261\346\235\216\347\231\273\350\274\235.txt
`-- \351\201\212\350\241\214
    |-- \345\244\247\345\256\2662.txt
    `-- \345\244\247\345\256\266.txt

1 directory, 5 files

$ tree --charset utf8
.
├── list2.txt
├── list.txt
├── \344\271\205\346\234\252\345\234\250\351\201\212\350\241\214\345\240\264\345\220\210\351\234\262\351\235\242\347\232\204\345\211\215\347\270\275\347\265\261\346\235\216\347\231\273\350\274\235.txt
└── \351\201\212\350\241\214
    ├── \345\244\247\345\256\2662.txt
    └── \345\244\247\345\256\266.txt

1 directory, 5 files
share|improve this question

1 Answer 1

up vote 6 down vote accepted

Try this:

tree -N
share|improve this answer
    
it works! great solution! –  動靜能量 Jun 27 '10 at 4:49

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.