The Cygwin tool is a GNU tool transplanted version on the Win32 platform, which follows the POSIX standard as much as possible. These include C / C compilers GCC, TextUtils, FileUtils, Bash, and so on. This article will explain how to use Chinese in Cygwin (B20).
Cygwin launches Bash by cygnus.bat (located in x: / cygnus / cygwin-b20), as follows:
@Echo off
Set make_mode = UNIX
SET PATH = C: / Cygnus / Cygwin ~ 1 / H-I586 ~ 1 / bin;% PATH%
Bash
@Echo off
Set make_mode = UNIX
SET PATH = C: / Cygnus / Cygwin ~ 1 / H-I586 ~ 1 / bin;% PATH%
Bash
In one of them (Before Bash):
Set home = x: / homename
Set home = x: / homename
X: For the drive letter, / Homename is the existing directory name, such as C: / MyHome. Bash will look for initialization files in the X: / Homename directory. By default, the Bash command line cannot enter Chinese characters, must establish files in the x: / homeage directory .inputrc, the content is as follows:
SET META-FLAG ON
SET Convert-Meta Off
Set Output-meta on
These lines are mainly to implement the input and display of Chinese characters on the command line. For example, I want to enter the name of the Chinese character.
SET META-FLAG ON
SET Convert-Meta Off
Set Output-meta on
These lines are mainly to implement the input and display of Chinese characters on the command line. For example, I want to enter the name of the Chinese character.
Note: In Cygwin-B20. INPUTRC must be a UN * X file format. Bash cannot accept Chinese characters input from the DOS window in Windows 9x.
In order to let the LESS command display Chinese characters in x: /homename/.bashrc:
Export lesscharset = latin1
Export lesscharset = latin1
In order to display the Chinese character file and the directory name in x: /homename/.bashrc:
Alias ls = 'ls -n --color'
Alias ls = 'ls -n --color'
Screenshot of Cygwin Bash Shell
Author: Blade Sun2002-5-1version 0.1gnuwin32@sohu.com