hztty.1
上传用户:minyiyu
上传日期:2018-12-24
资源大小:864k
文件大小:4k
- .TH HZTTY 1 "30 July 1992"
- .SH NAME
- hztty - make a cxterm session understand different encodings
- .SH SYNOPSIS
- .B hztty
- [
- .B -I
- .I input-stream
- ] [
- [
- .B -O
- .I output-stream
- ]
- [command line]
- .SH DESCRIPTION
- .B hztty
- translates Chinese codes on your terminal from some fIforeignfP
- encoding or representation standard to the fInativefP encoding
- understandable by your terminal.
- A fInativefP encoding is the standard used by your terminal session,
- for example ``GB'' on ``cxterm'', and
- ``Big5'' on ``cxterm -BIG5'' or ETen DOS.
- A fIforeignfP encoding is the one used by application running
- on the terminal, for example, the ``zW/HZ'' representation.
- .B hztty
- also translates Chinese codes you input on your terminal from
- the native encoding to the foreign encoding used by the application.
- .LP
- .B hztty
- was initially designed to read/post articles in the newsgroup
- ``alt.chinese.text'', in which the ``zW/HZ'' scheme is used to
- represent Chinese characters.
- Now it can do much more than that.
- .LP
- .B hztty
- ends when the forked shell exits.
- .SH IO STREAMS
- .LP
- The Chinese code conversion in hztty is organized using the
- .I stream
- mechanism.
- A stream consists of one or more conversion modules.
- Each of these modules implements a different kind of code conversion.
- In a stream the conversion modules form a pipeline that
- feeds one module's output to the next module's input.
- There is an input stream (from terminal input to the application)
- and an output stream (from the application to the terminal screen)
- in hztty.
- This version of hztty implements the following conversion modules.
- .TP
- .B hz2gb
- It converts zW/HZ to GB, usually used in output stream.
- .TP
- .B gb2hz
- It converts GB to zW/HZ, usually used in input stream.
- Note that you have to type in the escape sequences
- yourself and make the text conforms to HZ specification.
- Hztty enforces no encoding policy.
- .TP
- .B gb2big
- It converts GB to Big5.
- .TP
- .B big2gb
- It converts Big5 to GB.
- .TP
- .B dummy
- It does no conversion, bindly copying
- from the previous module to the next module.
- .TP
- .B log(fIfilenamefB)
- It does no conversion but saves a copy of every characters
- that passes through this module in a log file named fIfilenamefP.
- Be aware that the log file grows very fast
- since everything you type (or print on the screen) are saved.
- .SH OPTIONS
- .TP
- .B -I
- specifies the input stream.
- If there are more than one modules in the stream,
- the module names are separated by `:'.
- The default input stream is ``gb2hz''.
- .TP
- .B -O
- specifies the output stream.
- If there are more than one modules in the stream,
- the module names are seperated by `:'.
- The default output stream is ``hz2gb''.
- .LP
- If fIcommand linefP is not given, the user selected shell
- (from the environment variable SHELL) is invoked in the hztty session.
- Otherwise, the fIcommand linefP is invoked instead of the shell.
- .SH EXAMPLES
- Examples of conversion module combination in IO streams:
- .TP
- .B hztty
- It implies the default input/output streams of fB-O hz2gb -I gb2hzfP.
- It is useful in reading and writing HZ style Chinese codes
- (as in the newsgroup ``alt.chinese.text'').
- .TP
- .B hztty -O hz2gb:gb2big -I big2gb:gb2hz
- converts zW/HZ to Big5.
- Useful in reading ``alt.chinese.text'' in a Big5 cxterm or ETen DOS terminal.
- .SH SEE ALSO
- HZ - A Data Format for Exchanging Files of
- .br
- Arbitrarily Mixed Chinese and ASCII characters
- .SH AUTHOR
- .LP
- Yongguang Zhang, Purdue University,
- .I (ygz@cs.purdue.edu)
- .LP
- Copyright @ 1992 by Yongguang Zhang
- .br
- Permission to use, copy, modify, and redistribute is hereby granted.
- The author disclaims all warranties with regarding to this software.
- .SH CONTRIBUTORS AND ACKNOWLEDGEMENTS
- .LP
- Norm Matloff, University of California at Davis,
- .I (matloff@cs.ucdavis.edu),
- contributes his code for reading zW/HZ in a Big5 cxterm on the fly.
- .LP
- The Big5/GB conversion tables are generated from HC 1.2u,
- by Feng Feng Lee of Stanford University and
- Ricky Yeung of Washington University (now with Sun Microsystems).
- .LP
- Shangjie Jin of Edinburgh University, UK,
- .I (sjin@castle.edinburgh.ac.uk),
- ported hztty to sequent boxes.
- .SH BUGS
- .LP
- Cannot dynamically add (delete) a conversion module to (from) the streams.