.ig .\" hey, Emacs: -*- nroff -*- YYT is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. Use comman 'groff \-t \-e \-mandoc \-Tascii yyt.1' to get the file. .. .TH YYT 1 "June 2001" YiYanTang "Yi Yan Tang User Manual" .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" Session NAME: First session, followed by an one-liner. .\" The one lines is used by makewhatis. .SH NAME yyt \- A pseudo tty program which automatically converts among Chinese encodings. .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" SYNOPSIS: Command interface. .\" For functions, show required declaractions e.g. #include. .\" Boldface: as-is text .\" Italic: replaceable arguments, function arguments, filenames .\" brackets[]: surround optional arguments .\" vertical bar |: seperate choices .\" ellipses...: can be repeated .SH SYNOPSIS .B yyt [\-h|\-\-help] .br .B yyt [\-V|\-\-version] .br .B yyt [\-f \fIencoding\fP|\-\-from=\fIencoding\fP] [\-t \fIencoding\fP|\-\-to=\fIencoding\fP] .IR [command...] .PP Where [command...] is the command you want to run using yyt. If not given, the default is set to the environment variable .B SHELL. If .B SHELL is not set, .B /bin/sh will be used. .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" What the command does. .SH DESCRIPTION .B yyt is a pseudo tty program that will translate Chinese encodings automatically on a console. Supported encodings are BIG5/GB2312/HZ/UTF-7/UTF-8/UCS. .B yyt is similar to .IR hztty (1) except that yyt will make things automatic all the way. Yi Yan Tang use Saka's libhz to detect and convert Chinese encodings. libhz is include in autoconvert and can be found at http://www.debian.org/~ygh/. .\" Any options. .SH OPTIONS .B yyt supports following Chinese encodings for both input and output: .IP .B "GB2312, BIG5, HZ, UTF-7, UTF-8, UCS" .PP .B yyt supports following command line options: .IP "\-f \fIencoding\fP or \-\-from=\fIencoding\fP" This option sets the encoding of the incoming text. The valid values of encoding are specified above. .IP "\-t \fIencoding\fP or \-\-to=\fIencoding\fP" This option sets the encoding of the local terminal. The valid values of encoding are specified above. .IP "\-h or \-\-help" This option prints out the usage of yyt. .IP "\-V or \-\-version" Gives the current version of ytt. .PP .B NOTE: If the \-\-from encoding is not set, yyt will guess the encoding of the incoming text. You can safely type the command: .RS 5 % yyt .RE to start the program. Then you can use the command-mode described below to control how yyt acts. .SH USAGE There are some on the fly commands which can be used to control the behavior of .B yyt once it is started. User can use these commands to switch encoding, disable auto-encoding-detection or turn off encoding conversion all together. .PP To active the yyt command mode, press the combination key .PP .RS 10 .B ctrl-y .RE .PP (for switch-on-YYT-command-mode). Then follow a single key command. Once the command is entered, the command mode is switched off. .PP The possible commands in the command mode are: .IP g For switch incoming encoding to .B GB2312 encoding. .IP b For switch incoming encoding to .B BIG5 encoding. .IP h For switch incoming encoding to .B HZ encoding. .IP u For switch incoming encoding to .B UCS encoding. .IP 7 For switch incoming encoding to .B UTF-7 encoding. .IP 8 For switch incoming encoding to .B UTF-8 encoding. .IP r For reset encoding state to the initial mode. .IP d For turn off all the encoding conversions. .IP a For set the incoming encoding to auto-detect mode. .IP y For input a .B ctrl-y keycode to the terminal so that ctrl-y can still be typed in. .PP .B Note: If the incoming encoding is explicitly set either through command line options or on line command, the user input is also converted from the terminal encoding to the incoming encoding. .SH ENVIRONMENT .IP LC_CTYPE If set, the incoming encoding will be set to the encoding of LC_CTYPE. LC_CTYPE will be Overridden by the .B \-\-to command line option. .IP SHELL .br If set and there are no command line option given for [command...], the SHELL will be executed on the start of the program. .SH DIAGNOSTICS Please see BUGS section. .SH BUGS yyt tries to segment a stream of text into Hanzi parts and English parts. That way, we can have a better guessing on the Chinese encodings for every small part of Chinese. However, Hanzi segmentation does not always work correctly, especially when using curses/slang based programs. Redraw screen (normally ctrl-l) sometime correct it. This problem is expected. Suggestions on better segmentation algrithm are always welcomed. Turn off auto-detection by specify a fromcode by (ctr-y .I key ) will give better conversion result. .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .SH AUTHOR hashao .\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" Related manpages in alphabetical order. Maybe also other documents at the end. .\" man page in bold and section number in Roman man(7). .SH "SEE ALSO" .BR libhz (3), .BR pyhz (7), .BR hztty (1) .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""