LINUX Terminal garbled Solution __linux

Source: Internet
Author: User
Tags file copy i18n ssh
When installing Linux, choose to use Chinese, when using SSH, telnet login Operation command will appear in Chinese garbled, under RHEL5 pass the test. Modify the/etc/sysconfig/i18n to copy the contents to the Clipboard code: [root@php ~]# vi/etc/sysconfig/i18n #LANG = "ZH_CN. UTF-8 "lang=" ZH_CN. GB18030 "language=" ZH_CN.GB18030;ZH_CN.GB2313:ZH_CN "supported=" ZH_CN. Gb18030;zh_cn;zh:en_us. Utf-8;en_us:en "sysfont=" Lat0-sun16 "
A, Chinese characters garbled, virtual machine Linux installation when the default language used is Simplified Chinese, when I press CTRL + ALT +F1 switch terminal, when typing a command echo should be Chinese prompts, but all is garbled, this is because the terminal does not use the correct character set to explain the results of the echo. The solution is as follows: #export LANG=ZH_CN.         UTF-8 let us explain this command: Export://function: Set or display environment variable//syntax: Export [-fnp][variable name]=[variable value]//parameter:-F represents the function name in [variable name]-n deletes the specified variable -p Lists all shell-assigned environment variables two, English characters garbled: When the situation is the opposite, if the result of the English display and the end of the Chinese character set to explain the same will appear garbled how to solve it: #export Lang=en_us let the terminal use English character set bar; Terminal interface garbled: Sometimes we accidentally use cat binary system led to the end of the interface garbled, because the binary file has more control code; The solution is to use reset Terminal Reset command to solve the problem: #reset four, other kinds of terminal garbled sometimes through SSH into a remote Linux server, Cat a core file, and with the reset command can not succeed, how to do. Very simply, look at the following experiment, first cat a python compiled
File copy content to Clipboard code: # Cat Fibo.pyc m? {Shen c@sd Zd ZdS (ccs:d\}}x ' | | jo| g| | |}} Qwds (Nii (TATBTN) (RRR (tfibo.pytfibs
ccsig}d\}}x0| | Jo "|i| | | |}}" qw| S (Nii (Tresultrrrtappend (Rrrr () (Rtfib2 s N (RR (RR () (Rt?s oracle@linux-suse:~> vt102vt102 \-bash:vt102vt102: Command not found oracle@linux-suse:~> on the SSH terminal to see the garbled, prompt are disorderly, you can use the following command to restore the copied content to the Clipboard code: # tput Sgr0 garbled problem is caused by SSH problem, Because at other terminals, cat with a sample file, will not produce garbled, so the test garbled causes copied to the Clipboard code: # ^n As long as the use of ctrl+v,ctrl+n on the screen garbled, of course, after the resumption of the test with Ctrl+v,ctrl+o can be recovered garbled
Copy content to Clipboard code: # echo-e ' \xe ' screen again garbled, good, and then restore copied content to the Clipboard code: # echo-e ' \xf ' above is need to blind, because the screen is garbled, the final cause of the problem is the hexadecimal character e generated, the solution is also very simple, hexadecimal The character F can be.
Http://bbs.wh0553.net/thread-265-1-1.html

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.