old-www/HOWTO/Chinese-HOWTO-8.html

288 lines
10 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Linux Chinese HOWTO English Version: Useful Chinese Softwares</TITLE>
<LINK HREF="Chinese-HOWTO-9.html" REL=next>
<LINK HREF="Chinese-HOWTO-7.html" REL=previous>
<LINK HREF="Chinese-HOWTO.html#toc8" REL=contents>
</HEAD>
<BODY>
<A HREF="Chinese-HOWTO-9.html">Next</A>
<A HREF="Chinese-HOWTO-7.html">Previous</A>
<A HREF="Chinese-HOWTO.html#toc8">Contents</A>
<HR>
<H2><A NAME="software"></A> <A NAME="s8">8. Useful Chinese Softwares</A></H2>
<H2><A NAME="ss8.1">8.1 cjoe - Joe's Own Chinese Editor</A>
</H2>
<P>JOE is a free and professional ASCII codes' editor operated on UNIX platform, which is just like other text editors on IBM PC.
To use Chinese in JOE, you have to modify <CODE>.joerc</CODE> under your home directory.
Refer to the homepage for details:
<BLOCKQUOTE>
<A HREF="http://www.neto.net/~bv1al/linux/cjoe.html">http://www.neto.net/~bv1al/linux/cjoe.html</A></BLOCKQUOTE>
<P>CJOE is a Chinese version of JOE. Get it from here below:
<BLOCKQUOTE>
<A HREF="ftp://ftp.ifcss.org/pub/software/unix/editor/cjoe-2.8.tgz">ftp://ftp.ifcss.org/pub/software/unix/editor/cjoe-2.8.tgz</A></BLOCKQUOTE>
<P>It is very simple to compile and install. Unless you want to change locations of binary or man page files, or just follows the steps below:
<BLOCKQUOTE><CODE>
<PRE>
# make
# make install
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="ss8.2">8.2 celvis</A>
</H2>
<P>Celvis is a vi/ex-like editor on UNIX, which is almost supporting all instructions that vi/ex has.
You can edit articles including Chinese and English by using Celvis. Simultaneously, it also supports GB2312-80 and BIG5 codes.
<P>You can get it from here below,
<BLOCKQUOTE>
<A HREF="ftp://ftp.ifcss.org/pub/software/unix/editor/celvis-1.3.tar.gz">ftp://ftp.ifcss.org/pub/software/unix/editor/celvis-1.3.tar.gz</A></BLOCKQUOTE>
<P>Decompress it,
<BLOCKQUOTE><CODE>
<PRE>
# tar zxvf celvis-1.3.tar.gz
# cd celvis
</PRE>
</CODE></BLOCKQUOTE>
You need to change <CODE>tmp.c</CODE>, erasing 93-95 lines.
<HR>
<PRE>
#if OS9
if we don't have write permission...
#endif
</PRE>
<HR>
Then you can continue to compile it.
<BLOCKQUOTE><CODE>
<PRE>
# cp Makefile.s5 Makefile
# make install
</PRE>
</CODE></BLOCKQUOTE>
Because its <CODE>Makefile</CODE> is not for Linux particularly, you may see many warning message while compiling and linking; however, don't mention it, just keep it away.
After it is done, the <CODE>celvis</CODE> will be installed under <CODE>/usr/local/bin</CODE>.
<P>
<H2><A NAME="ss8.3">8.3 cvim</A>
</H2>
<P>cvim is a Chinese patch program out of vim-4.2, including some features like vi but has no track in celvis-1.3, such as line number, circling lines and large files' editions.
You can take <CODE>vim-4.2-Chinese-patch</CODE> and <CODE>vim-4.2.tar.gz:</CODE> from here,
<BLOCKQUOTE>
<A HREF="ftp://ftp.csie.nctu.edu.tw/pub/Unix/Chinese/cvim">ftp://ftp.csie.nctu.edu.tw/pub/Unix/Chinese/cvim</A></BLOCKQUOTE>
Untar and unzip following the steps below:
<BLOCKQUOTE><CODE>
<PRE>
# tar -xvzf vim-4.2.tar.gz
# cd vim-4.2/src
# patch &lt; ../../vim-4.2-Chinese-patch
</PRE>
</CODE></BLOCKQUOTE>
<P>Change <CODE>vim-4.2/src/feature.h</CODE> to fit your requires. It is simple to compile and install, that is,
<BLOCKQUOTE><CODE>
<PRE>
# make
# make install
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="ss8.4">8.4 he</A>
</H2>
<P>he was a famous editor on DOS, and is a diversion of Linux version. But this is a shareware program, limited with a hundred lines' edition.
<P>Obtain it from here,
<BLOCKQUOTE>
<A HREF="ftp://linux.cis.nctu.edu.tw/packages/he_linux/he_linux.tar.Z">ftp://linux.cis.nctu.edu.tw/packages/he_linux/he_linux.tar.Z</A></BLOCKQUOTE>
<P>Login as root,
<BLOCKQUOTE><CODE>
<PRE>
# cd /
# decompress he_linux.tar.Z
# tar xvf he_linux.tar
</PRE>
</CODE></BLOCKQUOTE>
<P>Refer to <CODE>/usr/lib/he/notes2.2</CODE>, <CODE>/usr/lib/he/chap15</CODE> and <CODE>/usr/lib/he/appendix</CODE> for more simple illustrations.
<P>
<H2><A NAME="ss8.5">8.5 hztty</A>
</H2>
<P>Hztty can make transformations among various Chinese codes. Decompress <CODE>hztty-2.0.tar.gz</CODE> first.
<BLOCKQUOTE><CODE>
<PRE>
# tar -xvzf hztty-2.0.tar.gz
# cd hztty-2.0
# make linux
</PRE>
</CODE></BLOCKQUOTE>
After compilation, move the binary file <CODE>hztty</CODE> to the directory <CODE>bin</CODE>, and move man pages to the directory <CODE>man</CODE>.
<BLOCKQUOTE><CODE>
<PRE>
# mv hztty /usr/local/bin
# chmod 555 /usr/local/bin/hztty
# cp hztty.1 /usr/local/man/man1
# chmod 444 /usr/local/man/man1/hztty.1
</PRE>
</CODE></BLOCKQUOTE>
Please refer to the on-line manual of hztty to use it.
<P>
<H2><A NAME="ss8.6">8.6 ktty</A>
</H2>
<P>This is another tool, like hztty, using for reading Chinese on kterm or pxvt.
Get it at this site:
<BLOCKQUOTE>
<A HREF="ftp://ftp.ifcss.org/pub/software/unix/convert/ktty1.3.tar.gz">ftp://ftp.ifcss.org/pub/software/unix/convert/ktty1.3.tar.gz</A></BLOCKQUOTE>
<P>However, it cannot be compiled on Linux, that you need use the ``<CODE>tty.c</CODE>'' in <CODE>hztty-2.0.tar.gz </CODE> and add the two lines to it.
<BLOCKQUOTE><CODE>
<PRE>
linux:
${MAKE} ${MFLAGS} DEFINES='-DPOSIX -DSYSV -DUSE_SYSV_UTMP' ${PROG}
</PRE>
</CODE></BLOCKQUOTE>
Then, you can make it work.
<BLOCKQUOTE><CODE>
<PRE>
# make linux
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="ss8.7">8.7 Cemacs and CChelp For Emacs</A>
</H2>
<P>Cemacs, using the GNU Emacs to show and edit Chinese files, has to run Emacs under Chinese virtual terminals while CCHELP is a system of providing Chinese assistant messages. After installed CCHELP, you can slip mouse to any Chinese word and click it without loosing, then there coming out with the messages about that word , including its pronunciation, English explanation and so forth. It supports both GB and BIG5 codes.
<P>You can get them from this site:
<BLOCKQUOTE>
<A HREF="ftp://ftp.math.psu.edu/pub/simpson/chinese/">ftp://ftp.math.psu.edu/pub/simpson/chinese/</A></BLOCKQUOTE>
<P>Install cemacs and cchelp in accordance with the README file.
<P>
<H2><A NAME="ss8.8">8.8 Mule</A>
</H2>
<P>The MULE is an abbreviation of MULtilingual Enhancement to GNU Emacs.
In simplicity, it adds some materials to GNU Emacs to make it dealing with multi-languages(encoding systems). It encodes the encoding system of multi bytes again in its inner mechanism; hence, a piece of paper can simultaneously use Chinese(BIG5 and GB), Japanese, Korean, English, Thai, and so on.
<P>
<H3>Obtaining Mule-2.3 and patch for Linux </H3>
<P>You can get <CODE>mule-2.3.tar.gz</CODE> and patch <CODE>mule-2.3+lx.diff.gz</CODE> for Linux:
<BLOCKQUOTE>
<A HREF="ftp://sunsite.unc.edu/pub/Linux/distributions/je/sources/mule/">ftp://sunsite.unc.edu/pub/Linux/distributions/je/sources/mule/</A></BLOCKQUOTE>
<P>If your system is Red Hat Linux, you can take <CODE>mule-2.3-1.i386.rpm</CODE>, <CODE>mule-common-2.3-1.i386.rpm</CODE> and <CODE>mule-elispsrc-2.3-1.i386.rpm</CODE>:
<BLOCKQUOTE>
<A HREF="ftp://sunsite.unc.edu/pub/Linux/distributions/redhat/contrib/contrib-2.0.x/RPMS/">ftp://sunsite.unc.edu/pub/Linux/distributions/redhat/contrib/contrib-2.0.x/RPMS/</A></BLOCKQUOTE>
<P>
<H3>Compiling and Installation</H3>
<P>Decompress packed files and add the patch in.
<BLOCKQUOTE><CODE>
<PRE>
# tar -xvzf mule-2.3.tar.gz
# patch &lt; mule-2.3+lx.diff
# cd mule-2.3/
# ./configure "i386-*-linux" --with-x11 --with-x-toolkit --with-gcc
</PRE>
</CODE></BLOCKQUOTE>
If you want to rectify the out-looking of mule to fit your taste, read <CODE>INSTALL</CODE> file, please.
And run ``<CODE>./configure --help</CODE>''.
Then, correct ``<CODE>src/Makefile</CODE>'', changing ``<CODE>-lcurses</CODE>'' to ``<CODE>-lncurses</CODE>''.
Then,
<BLOCKQUOTE><CODE>
<PRE>
# make
# make install
</PRE>
</CODE></BLOCKQUOTE>
Default installing directory is <CODE>/usr/local</CODE>.
<P>
<H3>Using Chinese in Mule-2.3</H3>
<P>If you have already installed fonts, you can use mule to enter and show Chinese. Most fonts are 16 or 24 points, so you can:
<BLOCKQUOTE><CODE>
<PRE>
# mule -fn 8x16 &amp;
</PRE>
</CODE></BLOCKQUOTE>
or
<BLOCKQUOTE><CODE>
<PRE>
# mule -fn 12x24 &amp;
</PRE>
</CODE></BLOCKQUOTE>
According to <CODE>M-x load-library RETURN chinese RETURN</CODE> .
``<CODE>Ctrl-]</CODE>'' to shift inputs.
<P>
<H2><A NAME="hc"></A> <A NAME="ss8.9">8.9 hc</A>
</H2>
<P>This is a program of conversion for BIG5 and GB codes. Get it at this site:
<BLOCKQUOTE>
<A HREF="ftp://ftp.ifcss.org/pub/software/unix/convert/hc-30.tar.gz">ftp://ftp.ifcss.org/pub/software/unix/convert/hc-30.tar.gz</A></BLOCKQUOTE>
Decompress and install it:
<BLOCKQUOTE><CODE>
<PRE>
# tar zxvf hc-30.tar.gz
# cd hc3
# make
# mv hc /usr/local/bin
# mv hc.tab /usr/local/lib/chinese
# mv hc.1 /usr/local/man/man1
</PRE>
</CODE></BLOCKQUOTE>
<P>For converting GB into BIG5 , using
<BLOCKQUOTE><CODE>
<PRE>
hc -m g2b -t /usr/local/lib/chinese/hc.tab &lt; INPUT_FILE > OUTPUT_FILE
</PRE>
</CODE></BLOCKQUOTE>
<P>For exchanging BIG5 into GB, using
<BLOCKQUOTE><CODE>
<PRE>
hc -m b2g -t /usr/local/lib/chinese/hc.tab &lt; INPUT_FILE > OUTPUT_FILE
</PRE>
</CODE></BLOCKQUOTE>
<P>You can write a shell script to simplify that instructions.
<P>
<H2><A NAME="ss8.10">8.10 ctin</A>
</H2>
<P>The ctin a news reader of all complete Chinese messages. Get it from here,
<BLOCKQUOTE>
<A HREF="ftp://linux.cis.nctu.edu.tw/packages/chinese/ctin/ctin-970625.src.bin.tgz">ftp://linux.cis.nctu.edu.tw/packages/chinese/ctin/ctin-970625.src.bin.tgz</A></BLOCKQUOTE>
<P>Set environment variables <CODE>$NNTPSERVER</CODE> first to export to the news server that you want to link before executing ctin.
<BLOCKQUOTE><CODE>
<PRE>
# export NNTPSERVER=netnews.ntu.edu.tw
</PRE>
</CODE></BLOCKQUOTE>
Then run <CODE>tin</CODE>.
<P>
<H2><A NAME="ss8.11">8.11 Some Other Toys</A>
</H2>
<P>You can find several small tools capable of showing Chinese, such as <CODE>cuptime</CODE>, <CODE>cw</CODE>, <CODE>cless</CODE>, <CODE>cwrite</CODE>, <CODE>cytalk</CODE>, and so forth.
<BLOCKQUOTE>
<A HREF="ftp://ftp.vit.edu.tw/unix/linux/chinese/">ftp://ftp.vit.edu.tw/unix/linux/chinese/</A></BLOCKQUOTE>
<P>
<P>
<HR>
<A HREF="Chinese-HOWTO-9.html">Next</A>
<A HREF="Chinese-HOWTO-7.html">Previous</A>
<A HREF="Chinese-HOWTO.html#toc8">Contents</A>
</BODY>
</HTML>