_____________________________________________________________________________ Network Chinese Filter (NCF) 1.07 Beta (A Part of NHF-- Network Hanzi Filter) This program is free for any use (including commercial), but is not garantteed for the result after its use, and the users can not modify it without the permission of the authors. Copyright (c) 1997 Zhu Haifeng Mu Yangzhi Zhou Xiaoyong Zhao Jinrong Tsinghua University, Beijing, China Comments: --> Standards: NCF conforms to Internet RFC 1922: "Chinese Character Encoding for Internet Messages". _____________________________________________________________________________ 1. Usage 2. Example: Work with Pine 3. Compile and install 4. Ftp site and Packing List 1. Usage NCF is a program written in standard C that handles many kinds of Chinese encoded messages (ISO-2022-CN/-EXT,HZ,GB,Big5,CNS). It only uses stdin and stdout to work as piped program with existing software, so that these software can be used to support Chinese processing without changes. NCF : Network Chinese Filter USAGE : ncf *{-[option][option value]} option meaning option value(case insenstive) and its meanings ------ ------- ---------------------------------------------- i incoming message automatically detect ISO-2022-CN/-EXT and HZ ext ISO-2022-CN-EXT cn ISO-2022-CN gb EUC GB 2312 big5 Big5 cns EUC CNS gbk GBK (not supported yet) hz HZ p platform gb EUC GB 2312 big5 Big5 cns EUC CNS gbk GBK (not supported yet) o outgoing message ext ISO-2022-CN/-EXT automatically (default) cn ISO-2022-CN gb EUC GB 2312 big5 Big5 transoff turn off the translation between the simplified Chinese and traditional Chinese characters 2. EXAMPLES Example.1. Set up filter for Pine 3.95: 1) if your platform is GB 2312, Configue your Pine: display-filters="" /home/zhf/ncf/ncf -pgb -i sending-filters=/home/zhf/ncf/ncf -pgb -o character-set=iso-2022-cn Note: full pathname of ncf must be given !! This will allow NCF automatically detect incoming messages. If the incoming message is ISO-2022-CN/-EXT (an improvement to HZ, it can transfer both GB simplified Chinese and Big5/CNS traditional Chinese characters) or HZ, it will automatically convert them into GB. The Big5 characters inside ISO-2022-CN/-EXT will be translated into GB automatically; if the incoming message is other encoding, NCF will let it pass into your Pine without changes. Your outgoing messages will be changed into ISO-2022-CN if you choose filter when sending, otherwise no changes will be made. 2) if your platform is Big5, similarly, display-filters="" /home/zhf/ncf/ncf -pbig5 -i sending-filters=/home/zhf/ncf/ncf -pbig5 -o character-set=iso-2022-cn This will allow NCF automatically detect incoming messages. If the incoming message is ISO-2022-CN/-EXT (an improvement to HZ, it can transfer both GB simplified Chinese and Big5/CNS traditional Chinese characters) or HZ, NCF will automatically convert them into Big5. The GB characters inside ISO-2022-CN/-EXT will be translated into Big5 automatically ; if the incoming message is other encoding, it will let it pass into your Pine without changes. 3) If your platform is GBK (e.g. codepage for PRC Win95, a codepage that contain both simplified and traditional characters) You can see all the simplified and traditional characters in ISO-2022-CN ! (This will be supported in NCF 1.10 ) Example.2. Use NCF as a universal convertor If you are a Taiwanese, receive a file or mail that written in simplified Chinese, do: ncf -pbig5 -igb < GB_file_you_received Then you will see the traditional form of this file. 3. Compile and install Get the package and uncompress it, then "make". 1) Uncompress gzip -d ncf.tar.gz then you will get ncf.tar tar -xvf ncf.tar then you will get a directory called ncf 2) compile enter this directory (ncf), and: make 4. FTP site and Packing List: 1) The ftp site of this software: ftp://ftp.net.tsinghua.edu.cn/pub/Chinese/ncf/ncf.tar.gz IP: 166.111.1.6 2) NCF procject contains the following files: big5_cns.h cc_lib.h cn_ext.h ncf_glb.h big5_cns.c cns_big5.c ext_enc.c ext_dec.c gb_big5.c gb_cns.c hz_gb.c ncf.c ncf_cnvt.c ncf_code.c ncf_err.c ncf_io.c