/* * hztty -- version 2.0 * * This program turns a tty session from one encoding to another. * For example, running hztty on cxterm can allow you to read/write * Chinese in HZ format, which was not supported by cxterm. * If you have many applications in different encodings but your * favor terminal program only supports one, hztty can make life easy. * For example, hztty can your GB cxterm into a HZ terminal, a * Unicode (16bit, or UTF8, or UTF7) terminal, or a Big5 terminal. * * The idea is to open a new shell session on top of the current one * and to translate the encoding between the new tty and the orignal. * For example, if your application uses encoding A and your terminal * supports encoding B. Hztty catches the output of the application * and converts them from A to B before sending to the terminal. * Similarly, hztty converts all the terminal input from B to A before * sending to the application. * * The conversion is implemented in a configurable I/O stream style. * Conversion modules are specified in command line options "-O" (for * output) and "-I" (for input). In each direction, conversion modules * can be piped one to one using connection character ':'. For example, * specifying "hz2gb:gb2big" in output stream translate the cxterm screen * output from zW/HZ to GB, then from GB to Big5. * * One interesting application is to emulate a 16bit Unicode terminal * on a GB or Big5 terminal. Although some information is lost (since * Unicode is a superset), you get a reasonable environment to try * running your Unicode program. * * Yongguang Zhang ~{UES@9b~} * ygz@cs.purdue.edu */ HISTORY ------- 2.0 jan/95 added Unicode, add code for OSF/Linux/IRIX5, remove et2hku 1.1 aug/93 supports more platforms including Solaris 2 1.0 sep/92 no major bugs have been reported since 0.99 ...