software: cdelegate, Chinese patch on DeleGate version : 1.4a function: provides code translation between Chinese/Japanese for WWW browsers URL : ftp://ftp.ifcss.org/pub/software/ author : Seke Wei, seke@sys.es.osaka-u.ac.jp -------------------------------------------------------------------------- Chinese 1.4a patch on the Delegate translation gateway Seke Wei 1996/05/01 Features: (1) supports filters among Chinese {Big5/GB/HZ/CN} and Japanese {EUC-Jis/Shift-Jis/Jis/JP}: (2) supports wild card flags, 'cn' and 'jp' (due to Yutaka Sato) (3) supports both new (cc.outcode.incode) and old (=??=) flags (4) supports hex mode flags like '%2D%5F%2D', which is equal to '-_-' (5) bypasses some .gif/.jpg links from the gateway to lessen the load (6) includes Chinese/Japanese translation library 'cn2jp1.4' which can be used independently of the delegate gateway ------------------------------------------------------------------------------ Purpose: This is a patch on DeleGate 3.0.17, a gateway for WWW access. This patch provides 12 translation functions, which enable the gateway to translate between Chinese and Japanese for the WWW client. With it, a WWW client can access Chinese resources via a Japanese browser, or vice versa. filter name function name in SINO.c ------------- ----------------------- Basics: Big5 -> EUCJis BIG_TO_EUC() EUCJis -> Big5 EUC_TO_BIG() GB -> EUCJis GB_TO_EUC() EUCJis -> GB EUC_TO_GB() Big5 -> GB BIG_TO_GB() GB -> Big5 GB_TO_BIG() GB -> HZ GB_TO_HZ() HZ -> GB HZ_TO_GB() Derivatives: Big5 -> Jis BIG_TO_JIS() GB -> Jis GB_TO_JIS() HZ -> Jis HZ_TO_JIS() HZ -> EUCJis HZ_TO_EUC() Requirements: (1) a Unix machine installed with DeleGate 3.0.17 or above (2) a hard disk of 15 Mega bytes in comilation, and 1 Mega bytes in running and maintenance. (3) an optional cache of over 20 Mega bytes to speed up repeated access Installation: Please get "delegate3.0.17.tar.gz", and install it. Then get "cdelegate1.4.tar.gz.uue", and follow the steps below: (1) uudecode cdelegate1.4.tar.gz.uue #obtain chinese1.4.tar.gz (2) gunzip cdelegate1.4.tar.gz #obtain chinese1.4.tar (3) cd {delegate3.0.17}/contrib/ccx #go to the ccx directory (4) gtar xvf cdelegate1.4.tar #untar from the ccx directory #two subdir will be produced: # ${DeleGate}/contrib/ccx/patch # ${DeleGate}/contrib/ccx/cn2jp (5) do make at {delegate3.0.17}/contrib/ccx/cn2jp/table #make executables 'mktable' and 'mktbl2c' #and cp to ~/bin (6) do make at {delegate3.0.17}/contrib/ccx/cn2jp #make library 'libcn2jp.a' #and cp to {delegate3.0.17}/lib (7) do make at {delegate3.0.17}/contrib/ccx/patch #patch on DeleGate 3.0.17 sources #refer to 'README' and modify 'Makefile' # if you don't need some of the added functions (8) do make at {delegate3.0.17}/contrib/ccx #make library 'libccx.a' #and cp to {delegate3.0.17}/lib (9) do make at {delegate3.0.17}/contrib/cii #make library 'libcii.a' #and cp to {delegate3.0.17}/lib (10) do make {delegate3.0.17}/src #make the delegated server (11) vi {delegate3.0.17}/src/run #refer to ${delegate3.0.17}/doc/Manual.txt #and set up the proper parameters (12) run #run the delegated server Usage: There are a total of 42 filters supported in this patch. To use a filter, you have to rewrite your URL and specify the proper flag in the following format: http://delegate_server:port/-_-/cc.outcode.incode/your_url ^^^^^^^^^^^^^^^^^^^^^^^ where 'incode' can be one among the 8 choices jis, sjis, euc big5, gb, hz jp, cn and 'outcode' one among the 6 choices jis, sjis, euc big5, gb, hz When incode=cn or incode=jp, auto recoginition of Chinese {Big5/HZ/GB} or Japanese {Jis/Shift-jis/EUC-Jis} is enabled. For example, you can accesss the GB to EUC-Jis filter by specifying "-_-/cc.euc.gb" in the URL as below: http://133.1.96.57:1995/-_-/cc.euc.gb/gopher://133.1.96.57:1234/00/lang_test/test.gb The 8 typical filters are shown as below: Big5 -> EUCJis http://delegate_server:port/-_-/cc.euc.big5/user_url GB -> EUCJis http://delegate_server:port/-_-/cc.euc.gb/user_url HZ -> EUCJis http://delegate_server:port/-_-/cc.euc.hz/user_url CN -> EUCJis http://delegate_server:port/-_-/cc.euc.cn/user_url Big5 -> GB http://delegate_server:port/-_-/cc.gb.big5/user_url CN -> GB http://delegate_server:port/-_-/cc.gb.cn/user_url JP -> GB http://delegate_server:port/-_-/cc.gb.jp/user_url GB -> Big5 http://delegate_server:port/-_-/cc.big5.euc/user_url HZ -> Big5 http://delegate_server:port/-_-/cc.big5.hz/user_url JP -> Big5 http://delegate_server:port/-_-/cc.big5.jp/user_url For more samples on invoking filters in a URL, please check out the document: gopher://133.1.96.57:1234/h0/chinese/magazine/cn-mag-e Backward Compatibility: In Chinese Patch prior to 1.3, the translation flag is specified by /-_-=BE=/ /-_-=BJ=/ /-_-=GE=/ /-_-=GJ=/ /-_-=HE=/ /-_-=HJ=/ In the patch 1.4, these obsolete flags are still usable, but you are recommended to re-write them as /-_-/cc.euc.big5/ /-_-/cc.jis.big5/ /-_-/cc.euc.gb/ /-_-/cc.jis.gb/ /-_-/cc.euc.hz/ /-_-/cc.jis.hz/ respectively, to conform to the new standard. Maitenance: Please check your setting in running. PERMIT restrict the protocol and hosts which can access your server. RELIABLE restricts the hosts that can access your server. REACHABLE restricts the hosts that users can access via your server. For details on the setting in running, please look at ${delegate}/doc/Manual.txt List on existing non-Chinese delegate gateways can be obtained from http://www.tokai-ic.or.jp/WWW/delegate/other-servers-e.html Reference: Conversion tables and codes are adapted from the following: (1) 'c2t', revised from 'gb2pinyin' (25 Nov 1992) by Katya Ta (ta_k@maths.su.oz.au) (2) 'gb2jis' Koichi Yasuoka and Motoko Ichitani (3) 'gb2pinyin' 1992 by Tommi Kaikkonen (tommi@phoenix.oulu.fi) (4) 'gbeuc' from ftp.kdd.co.jp [192.26.91.15]:/Japan/gbeuc Mosquito Von Sheng at sheng@csd.sumikin.co.jp (5) 'hc-30' Ricky Yeung (Ricky.Yeung@eng.sun.com) Fung F. Lee (lee@umunhum.stanford.edu) (6) 'hz2gb' 1989, 1992 Fung F. Lee (7) 'nctu-py-b5.tit' National Chiao-Tung University, HsuChu, Taiwan (8) 'sinocode' 1992 Per Hammarlund (9) 'CJKXRef' 14 March 1994, John H. Jenkins (John_Jenkins@taligent.com) (10) 'DeleGate' 1995, Yutaka Satoh (ysato@etl.go.jp) Distrubution: This patch can be obtained from gopher://133.1.96.57:1234/00/software/misc/chinese1.4.tar.gz.uue Delegate can be obtained from ftp://etlport.etl.go.jp/pub/DeleGate/ Bug Report: (1) For the 'cn' wild card flag as in '/-_-/cc.euc.cn/', auto recognition of input Chinese is not perfect yet (Big5 and GB are confused sometimes). You are recommended to specify the exact Chinese code {big5,gb,hz} if you know the coding of the input. (2) For the 'jp' wild card flag as in '/-_-/cc.big5.jp/', auto recognition is quite stable. So you are encouraged to use incode=jp in the flag. (3) People who use the following WWW browsers might have problem sending out the "http://server/-_-=cE=http://user_url" request: Mozilla/2.0b1 (Windows; I; 16bit) via proxy gateway CERN-HTTPD/3.0pre6 libwww/2.16beta Mozilla/1.1N (Macintosh; I; 68K) via proxy gateway CERN-HTTPD/3.0pre6 libwww/2.16beta For these people, please suggest them to get the newer browsers: Mozilla/1.22 (Windows; I; 16bit) via proxy gateway CERN-HTTPD/3.0 libwww/2.17 Mozilla/1.2N (Windows; I; 16bit) Mozilla/1.1N (Macintosh; I; 68K) via proxy gateway CERN-HTTPD/3.0 libwww/2.17 Mozilla/1.1N (Macintosh; I; PPC) via proxy gateway CERN-HTTPD/3.0 libwww/2.17 Mozilla/2.0b1 (Macintosh; I; PPC) (4) For other suggestion or problems, please report to seke@sys.es.osaka-u.ac.jp. Thank you.