Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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
up vote 9 down vote accepted

Try this:

tree -N
share|improve this answer
it works! great solution! – 太極者無極而生 Jun 27 '10 at 4:49

Your Answer


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.