Code: a multilingual file browser Version 1.3 Apr 1, 1996 By Seke Wei Usage: code [file_list] Requirements: (1) A unix machine where the cn2jp and kbhit libraries are installed (2) An end terminal which can display kanji characters. The end terminal can be a 'kterm' on Unix, or a 'telnetj' on Machintosh. Features: (1) Displays the kanji as much as supported by your terminal. (2) Auto detection of 6 common codes: BIG5, GB, EJIS, JIS, HZ, and B5EN. (3) Unmappable kanji can be shown with pinyin or uzpj system. (4) 5 modes of browsing are defined for easy examination of data. (5) Simple directory menu is supported. (6) .Z and .gz files are automatically uncompressed for viewing. Installation: (1) please fetch and make the cn2jp library from and copy the cn2jp library to the code directory by cp ${cn2jp}/libcn2jp.a ${code}/libcn2jp.a (2) please fetch and make the kbhit library (by Junn Ohta) from and copy the term.o object code to the code directory by cp ${kbhit}/term.o ${code}/term.o (3) fetch the code package from (4) extract 'code1.3.tar.gz.uue' at ${code} by %uudecode code1.3.tar.gz.uue %gunzip code1.3.tar.gz %tar xvf code1.3.tar (5) do make at ${code} and obtain the filter program ${code}/code (6) define the type of code which is supported by your terminal by setenv CODE_OUT_CODE code_type Note: Currently supported types are EJIS and JIS. (7) make sure that you have 'code' in your ~/bin. (8) type 'code' and select a few sample files for testing. samples files for various codes can be obtained from gopher://draco.sys.es.osaka-u.ac.jp:1234/11/lang_test (9) if you know the code of the file, you can stop the auto detection by pressing 'a', and select the input code by pressing 'i' until the correct one appears. Keyboard Commands: 'q','Q','0': quit the program 'l': view the file or cd to the directory 'h': quit the file or cd to the upper directory 'v': version report 'i', 'I': manually selects input code (next/previous) 'o', 'O': manually selects output code (next/previous) 'a': toggle auto detection mode for the input code Note: default input code is ascii with auto detection on Note: default output code is set by the environment variable 'CODE_OUT_CODE' Note: 7 kanji codes plus the ascii code are available: a ascii b big g gb e ejis j jis h hz 5 b5en s sjis '1': normal text display (default) '2': control code are prefixed with '^' char while the right half plane is inversed '3': control codes are underlined while the right half plane is inversed '4': dump mode 1. character above and its hex below '5': dump mode 2. hex code left and its character right ',', '.': scroll the display one column to the left/right '<', '>': scroll the display 40 columns to the left/right 'CR','j','J': scroll the display one row down 'k','K': scroll the display one row up 'd','D': scroll the display half page (10 rows) down 'u','U': scroll the display half page (10 rows) up ' ','+','f','Ctrl-f': scroll the display one page (20 rows) down '-','b','Ctrl-b': scroll the display one page (20 rows) up 'g','G': jump to beginning/end of the file '/': search forward '?': search backward 'c': toggle case on or off in searching Note: regular expression search is not supported yet 'D': toggle single/double line display mode (default single) 'z': toggle pinyin/uzpj for unmappable kanji (default uzpj) '7': toggle 0xff display mode (default on) 't', '9': toggle 0x9 (tab) display mode (default on) 'm': toggle 0xd (cr) display mode (default on) '8': toggle 0x8 (bs) display mode (default on) 'x': toggle code translation mode (default on) 'w': toggle wrap of line mode (unsupported yet) Reference: (1) Code definition: Info about Big5, Gb, Ejis, Jis, Hz and B5en codes "http://ifcss.org:8001/www/pub/software/info/cjk-codes/" "ftp://ifcss.org/software/unix/convert/BeTTY-ChnCodeFilters-1.50.tar.gz" (2) Code translation table: GB->EJIS, GB->PY, BIG5->EJIS, and BIG5->PY "ftp://ftp.center.osaka-u.ac.jp/mule/contrib/gb2jis.tar.gz" "ftp://ftp.center.osaka-u.ac.jp/mule/contrib/sinocode-0.11.tar.gz" "ftp://crl.nmsu.edu/pub/unicode.org/MappingTables/cjkxref.fix" "ftp://cnd.org/pub/ifcss.org/software/x-win/cxterm/dict/big5/PY-CSIE.tit" (3) UZPJ system: "ftp://ftp.center.osaka-u.ac.jp//mule/contrib/gb2jis.tar.gz" (4) kbhit library: By Junn Ohta URL for the newest version of 'code': "gopher://draco.sys.es.osaka-u.ac.jp:1234/11/software/code" Bug Report: (1) B5EN code is not supported yet. (2) For the first file opened by 'code', there might be lines unshown, or shown incompletely. When you find this, please close by 'h', and re-open it by 'l' to get a correct page. (3) Please email to seke@sys.es.osaka-u.ac.jp for any problem or suggestions.