//////////////////////////////////////////////////////////////////////////// cn2jp -- library for code translation between Chinese and Japanese Version 1.3.2, March 7, 1996 Seke Wei (seke@sys.es.osaka-u.ac.jp) Features: Provides the following 12 core translation functions: Big5 -> Euc-jis GB -> Euc-Jis Euc-Jis -> Big5 GB -> Big5 EUC-Jis -> GB Big5 -> GB HZ -> GB GB -> HZ {EUC-Jis/Jis/Shift-Jis} -> EUC-Jis EUC-Jis -> Shift-Jis EUC-Jis -> Jis EUC-Jis -> Kuten //////////////////////////////////////////////////////////////////////////// cn2jp -- Chinese {GB,Big5,HZ} and Japanese (EUC-Jis/Shift-Jis/Jis) by Seke Wei Library: Basics ---------------------------------------------------- char *lang_big5_to_eucjis(istr) ;translate Big5 in istr to EUC-Jis in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to subdirectory big2jis char *lang_gb_to_eucjis(); ;translate GB in istr to EUC-Jis in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to subdirectory gb2jis char *lang_eucjis_to_big5(istr) ;translate EUC-Jis in istr to Big5 in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to subdirectory jis2big char *lang_gb_to_big5(istr) ;translate GB in istr to Big5 in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to subdirectory gb2big char *lang_eucjis_to_gb(istr) ;translate EUC-Jis in istr to GB in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to subdirectory jis2gb char *lang_big5_to_gb(istr) ;translate Big5 in istr to GB in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to subdirectory big2gb Auxiliaries ---------------------------------------------------- char *lang_gb_to_hz(); ;translate GB in istr to HZ in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to lib/cn-util.c char *lang_hz_to_gb(); ;translate HZ in istr to GB in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to lib/cn-util.c char *lang_eucjis_to_jis(); ;translate EUC-Jis in istr to Jis in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to lib/jp-util.c char *lang_jis_to_eucjis(); ;translate Jis in istr to EUC-Jis in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to lib/jp-util.c char *lang_shiftjis_to_eucjis(); ;translate Shift-Jis in istr to EUC-Jis in allocated buffer ;refer to lib/jp-util.c char *lang_eucjis_to_shiftjis(); ;translate EUC-Jis in istr to Shift-Jis in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to lib/jp-util.c char *lang_jp_to_eucjis(); ;translate {Jis/EUC-Jis/Shift-Jis} in istr to ; EUC-Jis in allocated buffer ;the allocated buffer is returned and valid until next call ;refer to lib/jp-util.c Option ---------------------------------------------------- int lang_uzpj ;uses the uzpj system for unmappable words int lang_debug ;turns on the debug info in translation Test Program: big2jis/b2j translate Big5 to Jis/EUC-Jis/Shift-Jis/Kuten gb2jis/g2j translate GB to Jis/EUC-Jis/Shift-Jis/Kuten jis2big/j2b translate any Jis to Big5 gb2big/g2b translate GB to Big5 jis2gb/j2g translate any Jis to GB big2gb/b2g translate Big5 to GB Installation: (1) get cn2jp library from (2) change directory to ${cn2jp} (3) extract (1) at (2) (4) do make at ${cn2jp} and obtain ${cn2jp}/libcn2jp.a ${cn2jp}/big2jis/b2j ${cn2jp}/gb2jis/g2j ${cn2jp}/jis2big/j2b ${cn2jp}/gb2big/g2b ${cn2jp}/jis2jgb/j2g ${cn2jp}/big2gb/b2g This package is free for general distribution. This package runs on UNIX. You are welcome to port it to other operating Reference: (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) ////////////////////////////////////////////////////////////////////////////