OSDN Git Service

* (reinit): should initialize all static variables. [ruby-list:40445]
[nkf/nkf.git] / nkf.1
1 .TH NKF 2L 07/Feb/2004
2 .SH NAME
3 nkf \- Network Kanji code conversion Filter v2.0.4
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 facicility of 
19 .B nkf
20 is the guess of the input kanji code.
21 It currently recognizes 7-bit JIS, MS-kanji (shifted-JIS),utf-8 and EUC.
22 So users needn't 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 bellow:
31 .TP
32 .B \-j
33 output 7-bit JIS code.
34 This is a 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 accpet 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 excludde MS-Kanji.
53 .TP
54 .B \-E
55 Assume AT&T EUC input. It also accpet JIS.
56 Same as \-J.
57 .TP
58 .B \-B
59 Assume broken JIS-Kanji, which lost ESC.  Usefull 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 does loose encoding. It allows line break in the
69 middle of the basr64 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 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 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 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 the strage geta character.
118 .TP
119 .B \-b
120 bufferd output.
121 This is a default.
122 .TP
123 .B \-u
124 unbufferd output.
125 .TP
126 .B \-t
127 no operations.
128 .TP
129 .B \-O
130 Output result to file. The first name in arguments becomes output.
131 Please be careful. If there are no file arguments, nkf.out is chosen.
132 \--overwrite does rewriting. Original listed files are replaced by filtered
133 result.
134 .TP
135 .BI \-i c
136 output 
137 .BI ESC\-$\- c
138 as sequence to designate JIS-kanji
139 (Default is
140 .BR B .)
141 .TP
142 .BI \-o c
143 output 
144 .BI ESC\-(\- c
145 as sequence to designate single-byte roman characters
146 (Default is
147 .BR B .)
148 .TP
149 .B \-r
150 {de/en}crypt ROT13/47
151 .TP
152 .B \-v
153 display Version
154 .TP
155 .B \-T
156 Text mode output (MS-DOS)
157 .TP
158 .B \-c
159 add CR after NL.
160 .TP
161 .B \-d
162 delete CR after NL.
163 .TP
164 .B -L[wmu] new line mode
165 .nf
166     -Lu   unix (LF) 
167     -Lw   windows (CRLF) 
168     -Lm   mac (CR) 
169 default no conversion
170 .fl
171 .PP
172 .B \-F
173 New line preserving line folding.
174
175 .PP
176 hiragana/katakana translation
177    \-h1   \--katakana 
178    \-h2   \--hirakana
179    \-h3   \--hirakana-katakana
180
181 .TP
182 .B --
183 long options
184 .nf
185  --fj,--unix,--mac,--msdos, --windows
186        convert for these system
187
188  --jis,--euc,--sjis,--mime,--base64  
189        convert for named code
190  --jis-input,--euc-input,--sjis-input,--mime-input,--base64-input
191        assume input system
192
193  -- ignore rest of -option
194
195  --help
196  --version
197 .fl
198
199 .SH "FILES"
200 nkf - binary
201 .SH AUTHOR
202 Itaru Ichikawa <ichikawa@flab.fujitsu.co.jp>,
203 (was ichikawa@fujitsu.JUNET)
204 .SH EDITOR
205 a_kuroe@hoffman.cc.sophia.ac.jp (Akihiko Kuroe),
206 kono@ie.u-ryukyu.ac.jp (Shinji KONO),
207 furukawa@tcp-ip.or.jp ( Rei FURUKAWA    )`
208 .SH BUGS
209 .B Nkf
210 cannot handle some input that contains mixed kanji codes.
211 Automatic code detection 
212 becomes very weak with \-x, \-X and \-S. 
213 MIME encoding is very loose.
214
215 .fl
216
217 .SH ACKNOWLEDGE
218
219 Thanks for those people.
220
221 nkf 1.7,1.9,2.0
222
223 Akio Furukawa,
224 OHARA Shigeki,
225 Hiroaki Sengoku,
226 Ikuhiro MORITA,
227 Junn Ohta,
228 KAWAMURA Masao,
229 Kazuhiko Mori,
230 Keitaro Isokawa,
231 Ken-ichi Hirose,
232 Ki-ichiro SATO,
233 Kiwamu Aoyama,
234 Koichi Hirayama,
235 Mitsuru Hase,
236 OHARA Shigeki,
237 Rei FURUKAWA,
238 Satoru Takabayashi,
239 Shigeyuki Takagi,
240 Shin MICHIMUKO,
241 Tsutomu Sakai,
242 YAMASHITA Junji,
243 Yasuyuki Sato,
244 Yoshiaki Yanagihara,
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/