📄 hztty.1
字号:
.TH HZTTY 1 "29 January 1995".SH NAMEhztty \- make a tty session understand different encodings.SH SYNOPSIS.B hztty[.B \-h] [.B \-I.I input-stream] [.B \-O.I output-stream][command line].SH DESCRIPTION.B hzttytranslates Chinese codes on your terminal from some \fIforeign\fPencoding or representation standard to the \fInative\fP encodingunderstandable by your terminal.A \fInative\fP encoding is the standard used by your terminal session,for example ``GB'' on ``cxterm'', ``Big5'' on ``cxterm -BIG5'' or ET Dos.A \fIforeign\fP encoding is the one used by application runningon the terminal, for example, the ``zW/HZ'' representation,the standard ``Unicode'', the ASCII-compatible ``UTF8'',the mail-safe ``UTF7'', etc..B hzttyalso translates Chinese codes you input on your terminal fromthe native encoding to the foreign encoding used by the application..LP.B hzttywas initially designed to read/post articles in the newsgroup``alt.chinese.text'', in which the ``zW/HZ'' scheme is used torepresent Chinese characters.Now it can do much more than that..LP.B hzttyends when the forked shell exits..SH IO STREAMS.LPThe Chinese code conversion in hztty is organized using the.I streammechanism.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 hz2gbIt converts zW/HZ to GB, usually used in output stream..TP.B gb2hzIt converts GB to zW/HZ, usually used in input stream.Note that you have to type in the escape sequencesyourself and make the text conforms to HZ specification.Hztty enforces no encoding policy..TP.B gb2bigIt converts GB to Big5..TP.B big2gbIt converts Big5 to GB..TP.B uni-utfIt converts 16bit Unicode to 8-bit UTF format..TP.B utf-uniIt converts 8-bit UTF format to 16bit Unicode..TP.B uni-utf7It converts 16bit Unicode to 7-bit mail-safe UTF format (RFC1642)..TP.B utf7-uniIt converts the 7-bit mail-safe UTF format to 16bit Unicode..TP.B gb2uniIt converts GB to 16bit Unicode..TP.B uni2gbIt converts 16bit Unicode to GB..TP.B big2uniIt converts Big5 to 16bit Unicode..TP.B uni2bigIt converts 16bit Unicode to Big5..TP.B toascii.B toupper.B tolowerThey converts ASCII as those of ctype(3)..TP.B dummyIt does no conversion, bindly copyingfrom the previous module to the next module..TP.B log(\fIfilename\fB)It does no conversion but saves a copy of every charactersthat passes through this module in a log file named \fIfilename\fP.Be aware that the log file grows very fastsince everything you type and all program output are saved..SH OPTIONS.TP.B \-hprints the help message and lists all the module implemented..TP.B \-Ispecifies 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 \-Ospecifies 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''..LPIf \fIcommand line\fP is not given, the user selected shell(from the environment variable SHELL) is invoked in the hztty session.Otherwise, the \fIcommand line\fP is invoked instead of the shell..SH EXAMPLESExamples of conversion module combination in IO streams:.TP.B hzttyIt implies the default input/output streams of \fB-O hz2gb -I gb2hz\fP.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:gb2hzconverts between HZ and Big5.In the output stream, HZ output are converted to GB first, then to Big5.In the input stream, Big5 input are converted to GB first, then to HZ.Useful in reading ``alt.chinese.text'' in a Big5 cxtermor other terminal emulator (e.g., kermit over IBM-PC running ET DOS). .TP.B hztty -O utf-uni:uni2gb -I gb2uni:uni-utfconverts UTF output into GB in the output streamand GB into UTF in the input stream..SH SEE ALSOHZ - A Data Format for Exchanging Files of.brArbitrarily Mixed Chinese and ASCII characters.LPMore on Unicode in ftp://unicode.org/pub/.SH AUTHOR.LPYongguang Zhang.I (ygz@cs.purdue.edu).LPCopyright @ 1992, 1995 by Yongguang Zhang.brPermission to use, copy, modify, and redistribute is hereby granted.The author disclaims all warranties with regarding to this software..SH CONTRIBUTORS AND ACKNOWLEDGEMENTS.LPNorm 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..LPThe Big5/GB conversion tables are generated from HC 1.2u,by Feng Feng Lee of Stanford University andRicky Yeung of Washington University (now with Sun Microsystems)..LPThe Unicode conversion tables are generated from Ross Paterson'sutf7 package..I (<rap@doc.ic.ac.uk>).LPShangjie Jin of Edinburgh University, UK,.I (sjin@castle.edinburgh.ac.uk),ported hztty to sequent boxes..SH BUGS.LPCannot dynamically add (delete) a conversion module to (from) the streams.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -