Target: The terminal uses the commands less/more/grep to correctly display the contents of the GBK encoded file. vim correctly displays the GBK encoded file Chinese characters
Symptoms:
1. The system comes with gnome-terminal After setting the terminal code to GBK, the target can be achieved.
2. Using xshell When setting the terminal encoding to default on the Windows platform, ssh logs in to CentOS and can achieve the goal.
3. In the screen command window, regardless of the terminal or vim, Chinese is displayed as garbled and cannot reach the target.
Workaround: In ~/.screenrc, add the following two sentences:
defencoding GBKencoding UTF-8 GBK
My guess is xshell, gnome-terminal, etc. The ability to pass its own code to the system, so the system can automatically transcode the output. The screen belongs to the terminal in the terminal, and its own encoding is not GBK, which causes the output to be transcoded after being transmitted to the system. After setting the encoding and conversion rules for screen, it will be OK.
Format: printf("\\033[word background color; font color m string \\033[0m" ); printf("
Requirement Description Set SNAT policy using iptables Make hosts on 192.168.100.0/24 network segmen
Speaking of the command, you have to mention this special command vi it is not only a command, but a
1. When Liunx just started rebooting. Here we press the “e” key to enter the Grub config
Summary of dual network card configuration practice under Linux system
Commonly used Linux system monitoring commands introduction
ARM ADS assembly and Gnu assembly conversion
Linux startup script learning tutorial
Linux system configuration and optimization experience
Introducing the Linux hard disk system to establish partition steps
Differential mode and common mode signal
Linux shell awk process control statement (if, for, while, do) details
The difference between LINUX and WINDOWS kernels
Teaching: Help you easily get the software installation of Linux system
Win10 start menu can not find the control panel solution
Win10 can not get the member version How to do the member version button gray question
Easy configuration for multi-person applications Win XP SP2 (1)
Win10 app store can't open? Microsoft officially provides repair methods
Windows7 playing Flash video has no sound?
How does Win8 implement full control of shared files by other users
Win10 combination shortcut: win key combination shortcut Daquan
Win8 computer wireless network is often restricted how to do