Linux tree Command garbled, linuxtree command garbled

Source: Internet
Author: User

Linux tree Command garbled, linuxtree command garbled

Garbled characters appeared when running the tree Command in Linux today. I checked it online and said we need to use tree-charset ASCII, which is forced to use ASCII characters. In this way, the output is normal. But the LANG = US.UTF-8 in my environment, so if there are non-ASCII characters, it will cause output garbled.

Since tree enables charset settings, I will execute the tree -- charset UTF-8 Based on the character set in my environment and find it garbled. This cannot be understood. I suddenly realized that the settings in my SecureCRT were incorrect.

Check SecureCRT-> Session Options-> Terminal-> Appearance-> Character Encoding, haha, sure enough, here is not set to the same UTF-8 as the remote host, but default. After the change, run the tree. Everything is normal.

The forced use of the ASCII character set is just a bit cool. The so-called workaround und is also. to be cool and cool for a long time, you still need to find the root cause.


In linux, how does one view the specific implementation of various commands, such as the tree Command, but garbled characters when opened with vim? I want to see the specific source code,

The specific source code can only be found online. Because the commands are compiled during installation.
It is not the source code. Or the directory/usr/is down during installation. I forgot a bit. Is used to put the source code.
Baidu on your own.

Linux Command Line feedback garbled

Export LANG = en_US.UTF-8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.