OSDN Git Service

* Add convertion table:
[nkf/nkf.git] / nkf.1
1 .TH NKF 2L 07/Feb/2004
2 .SH NAME
3 nkf \- Network Kanji code conversion Filter v2.0.5
4 .SH SYNOPSIS
5 .B nkf
6 [
7 .B options
8 ] [
9 .B file
10 ]
11 .SH DESCRIPTION
12 .PP
13 .B Nkf
14 is a yet another kanji code converter among networks, hosts and terminals.
15 It converts input kanji code to designated kanji code
16 such as 7-bit JIS, MS-kanji (shifted-JIS), utf-8 or EUC.
17 .PP
18 One of the most unique faculty of 
19 .B nkf
20 is the guess of the input kanji encodings.
21 It currently recognizes 7-bit JIS, MS-kanji (shifted-JIS),utf-8 and EUC.
22 So users needn't give the input kanji code specification.
23
24 By default, X0201 kana is converted into X0208 kana. For
25 X0201 kana, SO/SI, SSO and
26 ESC-(-I methods are supported. For automatic code detection, nkf assumes
27 no X0201 kana in MS-Kanji. To accept X0201 in MS-Kanji, use \-X, \-x or
28 \-S.
29 .PP
30 Options are shown below:
31 .TP
32 .B \-j
33 output 7-bit JIS code.
34 This is default.
35 .TP
36 .B \-s
37 output MS-kanji (shifted-JIS) code.
38 .TP
39 .B \-e
40 output EUC (AT&T) code.
41 .TP
42 .B \-w
43 output UTF-8 (Unicode 8bit form).
44 .TP
45 .B \-S
46 Assume MS-Kanji and X0201 kana input. It also accepts JIS.
47 AT&T EUC is recognized as X0201 kana. Without \-x flag,
48 X0201 kana is converted into X0208.
49 .TP
50 .B \-J
51 Assume  JIS input. It also accepts Japanese EUC.
52 This is the default. This flag does not exclude MS-Kanji.
53 .TP
54 .B \-E
55 Assume AT&T EUC input. It also accepts JIS.
56 Same as \-J.
57 .TP
58 .B \-B
59 Assume broken JIS-Kanji input, which lost ESC.  Useful when your site is 
60 using old B-News Nihongo patch. \-B1 allows any char after ESC-( or
61 ESC-$. \-B2 forces ASCII after NL.
62 .TP
63 .B \-W
64 Assume UTF-8 input.
65 .TP
66 .B \-m
67 MIME ISO-2022-JP/ISO8859-1 decode. (default) To see ISO8859-1 (Latin-1)
68 \-l is necessary. \-mN is for loose encoding. It allows line break in the
69 middle of the base64 encoding.
70 .TP
71 .B \-mB
72 Decode MIME base64 encoded stream. Remove header or other part before
73 conversion. 
74 .TP
75 .B \-mQ
76 Decode MIME quoted stream. '_' in quoted stream is converted to space.
77 .TP
78 .B \-m0
79 No MIME decode.
80 .TP
81 .B \-M
82 MIME encode. Header style. All ASCII code and control characters are
83 intact.
84 .TP
85 .B \-MB
86 MIME encode.  Base64 stream. Kanji conversion is performed before encoding,
87 so this cannot be used as a picture encoder. \MQ perfome quoted encoding.
88 .TP
89 .B \-l
90 Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.
91 \-s, \-e and \-x are not compatible with this option.
92 .TP
93 .BI \-f n
94 Folding on 
95 .BI n 
96 length in a line. Default is 60. \-f40-0 forces 0 margin folding.
97 .TP
98 .B \-X
99 Allow X0201 kana in MS-Kanji.  
100 X0201 is converted into X0208 Kana by default.
101 This is default in MSDOS.
102 .TP
103 .B \-x
104 Try to preseve X0208 kana.
105 Assume X0201 kana in MS-Kanji. And
106 do not convert X0201 kana to X0208. 
107 In JIS output, ESC-(-I is used. In EUC output, SSO is used.
108 .TP
109 .B \-Z
110 Convert X0208 alphabet to ASCII. \-Z1 converts X0208 kankaku to one 
111 ASCII space. \-Z2 converts X0208 kankaku to two ASCII spaces.
112 .TP
113 .B \-Z3
114 Replacing >,<,",& into '&gt;', '&lt;', '&quot;', '&amp;' as in HTML.
115 .TP
116 .B \-I
117 Replacing non iso-2022-jp char into a geta character
118 (substitute character in Japanese).
119 .TP
120 .B \-b
121 buffered output.
122 This is default.
123 .TP
124 .B \-u
125 unbuffered output.
126 .TP
127 .B \-t
128 no operations.
129 .TP
130 .B \-O
131 Output result to file. The first string in arguments becomes output file name.
132 Please be careful. If there are no file arguments, nkf.out is chosen.
133 \--overwrite does rewriting. Original listed files are replaced by filtered
134 result.
135 .TP
136 .BI \-i c
137 output 
138 .BI ESC\-$\- c
139 as sequence to designate JIS-kanji
140 (Default is
141 .BR B .)
142 .TP
143 .BI \-o c
144 output 
145 .BI ESC\-(\- c
146 as sequence to designate single-byte roman characters
147 (Default is
148 .BR B .)
149 .TP
150 .B \-r
151 {de/en}crypt ROT13/47
152 .TP
153 .B \-v
154 display Version
155 .TP
156 .B \-T
157 Text mode output (MS-DOS)
158 .TP
159 .B \-c
160 add CR after NL.
161 .TP
162 .B \-d
163 delete CR after NL.
164 .TP
165 .B -L[wmu] new line mode
166 .nf
167     -Lu   unix (LF) 
168     -Lw   windows (CRLF) 
169     -Lm   mac (CR) 
170 default is no conversion (output as it is).
171 .fl
172 .PP
173 .B \-F
174 New line preserving line folding.
175
176 .PP
177 hiragana/katakana translation
178    \-h1   \--katakana 
179    \-h2   \--hirakana
180    \-h3   \--hirakana-katakana
181
182 .TP
183 .B --
184 long options
185 .nf
186  --fj,--unix,--mac,--msdos, --windows
187        convert for these system
188
189  --jis,--euc,--sjis,--mime,--base64  
190        convert for named code
191  --jis-input,--euc-input,--sjis-input,--mime-input,--base64-input
192        assume input system
193
194  -- ignore rest of -option
195
196  --help
197  --version
198 .fl
199
200 .SH "FILES"
201 nkf - binary
202 .SH AUTHOR
203 Itaru Ichikawa <ichikawa@flab.fujitsu.co.jp>,
204 (was ichikawa@fujitsu.JUNET)
205 .SH EDITOR
206 a_kuroe@hoffman.cc.sophia.ac.jp (Akihiko Kuroe),
207 kono@ie.u-ryukyu.ac.jp (Shinji KONO),
208 furukawa@tcp-ip.or.jp ( Rei FURUKAWA    )`
209 .SH BUGS
210 .B Nkf
211 cannot handle some input that contains mixed kanji codes.
212 Automatic code detection 
213 becomes very weak with \-x, \-X and \-S. 
214 MIME encoding is very loose.
215
216 .fl
217
218 .SH ACKNOWLEDGE
219
220 Thanks for those people.
221
222 nkf 1.7,1.9,2.0
223
224 Akio Furukawa,
225 OHARA Shigeki,
226 Hiroaki Sengoku,
227 Ikuhiro MORITA,
228 Junn Ohta,
229 KAWAMURA Masao,
230 Kazuhiko Mori,
231 Keitaro Isokawa,
232 Ken-ichi Hirose,
233 Ki-ichiro SATO,
234 Kiwamu Aoyama,
235 Koichi Hirayama,
236 Mitsuru Hase,
237 OHARA Shigeki,
238 Rei FURUKAWA,
239 Satoru Takabayashi,
240 Shigeyuki Takagi,
241 Shin MICHIMUKO,
242 Tsutomu Sakai,
243 YAMASHITA Junji,
244 Yasuyuki Sato,
245 Yoshiaki Yanagihara,
246 hat@so-net,
247 SHIOZAKI Takehiko,
248 Koji Arai,
249 Eiichiro Itani,
250 Masayuki Hatta,
251 and many others.
252
253 URL:
254      www.ie.u-ryukyu.ac.jp/~kono/nkf/