~ubuntu-branches/ubuntu/natty/yiyantang/natty

« back to all changes in this revision

Viewing changes to doc/C/yyt.1

  • Committer: Bazaar Package Importer
  • Author(s): Yu Guanghui
  • Date: 2001-06-17 10:28:10 UTC
  • Revision ID: james.westby@ubuntu.com-20010617102810-ncxnnmsj1o10w1tt
Tags: upstream-0.7.0
ImportĀ upstreamĀ versionĀ 0.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.ig .\" hey, Emacs:   -*- nroff -*-
 
2
 YYT is free software; you can redistribute it and/or modify
 
3
 it under the terms of the GNU General Public License as published by
 
4
 the Free Software Foundation; either version 2 of the License, or
 
5
 (at your option) any later version.
 
6
 
 
7
 This program is distributed in the hope that it will be useful,
 
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
 GNU General Public License for more details.
 
11
 
 
12
 You should have received a copy of the GNU General Public License
 
13
 along with this program; see the file COPYING.  If not, write to
 
14
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
15
 
 
16
 Use comman 'groff -t -e -mandoc -Tascii yyt.1'  to get the file.
 
17
..
 
18
.TH YYT 1 "June 2001" YiYanTang "Yi Yan Tang User Manual"
 
19
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
20
.\" Session NAME: First session, followed by an one-liner.
 
21
.\" The one lines is used by makewhatis.
 
22
.SH NAME
 
23
yyt \- A psuedo tty program which automatically converts among Chinese encodings.
 
24
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
25
.\" SYNOPSIS: Command interface.
 
26
.\" For functions, show required declaractions e.g. #include.
 
27
.\" Boldface: as-is text
 
28
.\" Italic: replaceable arguments, function arguments, filenames
 
29
.\" brackets[]: surround optional arguments
 
30
.\" vertical bar |: seperate choices
 
31
.\" ellipses...: can be repeated
 
32
.SH SYNOPSIS
 
33
.B yyt
 
34
[\-h|\-\-help]
 
35
.br
 
36
.B yyt
 
37
[\-V|\-\-version]
 
38
.br
 
39
.B yyt
 
40
[\-f \fIencoding\fP|\-\-from=\fIencoding\fP]
 
41
[\-t \fIencoding\fP|\-\-to=\fIencoding\fP]
 
42
.IR [command...]
 
43
.PP
 
44
Where [command...] is the command you want to run using yyt. If not given,
 
45
the default is set to the environment variable
 
46
.B SHELL.
 
47
If
 
48
.B SHELL
 
49
is not set,
 
50
.B /bin/sh
 
51
will be used.
 
52
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
53
.\" What the command does. 
 
54
.SH DESCRIPTION
 
55
.B yyt
 
56
is a psuedo tty program that will translate Chinese encodings automatically
 
57
on a console. Supported encodings are BIG5/GB2312/HZ/UTF-7/UTF-8/UCS.
 
58
 
 
59
.B yyt
 
60
is similar to
 
61
.IR hztty (1)
 
62
except that yyt will make things automatic all the way.
 
63
 
 
64
Yi Yan Tang use Saka's libhz to detect and convert Chinese encodings. libhz
 
65
is include in autoconvert and can be found at http://www.debian.org/~ygh/.
 
66
.\" Any options.
 
67
.SH OPTIONS
 
68
.B yyt
 
69
supports following Chinese encodings for both input and output:
 
70
.IP
 
71
.B "GB2312, BIG5, HZ, UTF-7, UTF-8, UCS"
 
72
.PP
 
73
.B yyt
 
74
supports following command line options:
 
75
.IP "\-f \fIencoding\fP or \-\-from=\fIencoding\fP"
 
76
This option sets the encoding of the incoming text. The valid values of
 
77
encoding are specified above.
 
78
.IP "\-t \fIencoding\fP or \-\-to=\fIencoding\fP"
 
79
This option sets the encoding of the local terminal. The valid values of
 
80
encoding are specified above.
 
81
.IP "\-h or \-\-help"
 
82
This option prints out the usage of yyt.
 
83
.IP "\-V or \-\-version"
 
84
Gives the current version of ytt.
 
85
.PP
 
86
.B NOTE:
 
87
If the \-\-from encoding is not set, yyt will guess the encoding of the
 
88
incoming text. You can safely type the command:
 
89
.RS 5
 
90
% yyt
 
91
.RE
 
92
to start the program. Then you can use the command-mode described below
 
93
to control how yyt acts.
 
94
.SH USAGE
 
95
There are some on the fly commands which can be used to control the
 
96
behavior of
 
97
.B yyt
 
98
once it is started. User can use these commands to switch encoding,
 
99
disable auto-encoding-detection or turn off encoding conversion all
 
100
together.
 
101
.PP
 
102
To active the yyt command mode, press the combination key
 
103
.PP
 
104
.RS 10
 
105
.B ctrl-y
 
106
.RE
 
107
.PP
 
108
(for switch-on-YYT-command-mode). Then follow a single key command. Once
 
109
the command is entered, the command mode is switched off.
 
110
.PP
 
111
The possible commands in the command mode are:
 
112
.IP g
 
113
For switch incoming encoding to
 
114
.B GB2312
 
115
encoding.
 
116
.IP b
 
117
For switch incoming encoding to
 
118
.B BIG5
 
119
encoding.
 
120
.IP h
 
121
For switch incoming encoding to
 
122
.B HZ
 
123
encoding.
 
124
.IP u
 
125
For switch incoming encoding to
 
126
.B UCS
 
127
encoding.
 
128
.IP 7
 
129
For switch incoming encoding to
 
130
.B UTF-7
 
131
encoding.
 
132
.IP 8
 
133
For switch incoming encoding to
 
134
.B UTF-8
 
135
encoding.
 
136
.IP r
 
137
For reset encoding state to the initial mode.
 
138
.IP d
 
139
For turn off all the encoding conversions.
 
140
.IP a
 
141
For set the incoming encoding to auto-detect mode.
 
142
.IP y
 
143
For input a
 
144
.B ctrl-y
 
145
keycode to the terminal so that ctrl-y can still be typed in.
 
146
.PP
 
147
.B Note:
 
148
If the incoming encoding is explicitly set either through command line
 
149
options or on line command, the user input is also converted from the
 
150
terminal encoding to the incoming encoding.
 
151
.SH ENVIRONMENT
 
152
.IP LC_CTYPE
 
153
If set, the incoming encoding will be set to the encoding of LC_CTYPE.
 
154
LC_CTYPE will be Overriden by the
 
155
.B \-\-to
 
156
command line option.
 
157
.IP SHELL
 
158
.br
 
159
If set and there are no command line option given for [command...], the
 
160
SHELL will be executed on the start of the program.
 
161
.SH DIAGNOSTICS
 
162
Please see BUGS section.
 
163
.SH BUGS
 
164
yyt tries to segment a stream of text into Hanzi parts and English parts.  That
 
165
way, we can have a better guessing on the Chinese encodings for every small
 
166
part of Chinese. However, Hanzi segmentation does not always work correctly,
 
167
especially when using curses/slang based programs. Redraw screen (normally
 
168
ctrl-l) sometime correct it. This problem is expected.  Suggestions on better
 
169
segmentation algrithm are always welcomed.
 
170
 
 
171
Turn off auto-detection by specify a fromcode by (ctr-y
 
172
.I key
 
173
) will give better conversion result.
 
174
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
175
.SH AUTHOR
 
176
hashao <hashao@chinese.com>
 
177
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
178
.\" Related manpages in alphabetical order. Maybe also other documents at the end.
 
179
.\" man page in bold and section number in Roman man(7).
 
180
.SH "SEE ALSO"
 
181
.BR libhz (3),
 
182
.BR pyhz (7),
 
183
.BR hztty (1)
 
184
.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
185
.br
 
186
.B yiyantang homepage at
 
187
http://yiyantang.on.openave.net/
 
188
.\".UR http://yiyantang.on.openave.net
 
189
.\".UE
 
190
.br
 
191
.B autoconvert homepage at
 
192
http://www.debian.org/~ygh/
 
193
.\" .UR http://www.debian.org/~ygh/
 
194
.\" .UE
 
195