File: nkf.1

package info (click to toggle)
nkf 1.92-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 232 kB
  • ctags: 194
  • sloc: ansic: 1,865; perl: 327; makefile: 73
file content (188 lines) | stat: -rw-r--r-- 3,996 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
.TH NKF 1L 24/Feb/2000
.SH NAME
nkf \- Network Kanji code conversion Filter v1.9
.SH SYNOPSIS
.B nkf
[
.B options
] [
.B file
]
.SH DESCRIPTION
.PP
.B Nkf
is a yet another kanji code converter among networks, hosts and terminals.
It converts input kanji code to designated kanji code
such as 7-bit JIS, MS-kanji (shifted-JIS) or EUC.
.PP
One of the most unique facicility of 
.B nkf
is the guess of the input kanji code.
It currently recognizes 7-bit JIS, MS-kanji (shifted-JIS) and EUC.
So users needn't the input kanji code specification.

By default X0201 kana is converted into X0208 kana. For
X0201 kana, SO/SI, SSO and
ESC-(-I methods are supported. For automatic code detection, nkf assumes
no X0201 kana in MS-Kanji. To accept X0201 in MS-Kanji, use \-X, \-x or
\-S.
.PP
Options are bellow:
.TP
.B \-b
bufferd output.
This is a default.
.TP
.B \-u
unbufferd output.
.TP
.B \-t
no operations.
.TP
.B \-j
output 7-bit JIS code.
This is a default.
.TP
.B \-s
output MS-kanji (shifted-JIS) code.
.TP
.B \-e
output EUC (AT&T) code.
.TP
.BI \-i c
output 
.BI ESC\-$\- c
as sequence to designate JIS-kanji
(Default is
.BR B .)
.TP
.BI \-o c
output 
.BI ESC\-(\- c
as sequence to designate single-byte roman characters
(Default is
.BR B .)
.TP
.B \-r
{de/en}crypt ROT13/47
.TP
.B \-v
display Version
.TP
.B \-T
Text mode output (MS-DOS)
.TP
.B \-m
MIME ISO-2022-JP/ISO8859-1 decode. (default) To see ISO8859-1 (Latin-1)
\-l is necessary. 
.TP
.B \-mB
Decode MIME base64 encoded stream. Remove header or other part before
conversion.
.TP
.B \-mQ
Decode MIME quoted stream. '_' in quoted is converted to space.
.TP
.B \-m0
No MIME decode.
.TP
.B \-M
MIME encode. Header style. All ASCII code and control characters are
intact.
.TP
.B \-MB
MIME encode.  Base64 stream. Kanji conversion is performed before encoding,
so this cannot be used as a picture encoder.
.TP
.B \-l
Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.
\-s, \-e and \-x are not compatible with this option.
.TP
.BI \-f n
Folding on 
.BI n 
length in a line. Default 60.
.TP
.B \-X
Allow X0201 kana in MS-Kanji.  
X0201 is converted into X0208 by default.
This is default in MSDOS.
.TP
.B \-x
Try to preseve X0208 kana.
Assume X0201 kana in MS-Kanji. And
do not convert X0201 kana to X0208. 
In JIS output, ESC-(-I is used. In EUC output, SSO is used.
.TP
.B \-Z
Convert X0208 alphabet to ASCII. \-Z1 converts X0208 kankaku to one 
ASCII space. \-Z2 converts X0208 kankaku to two ASCII spaces.
.TP
.B \-S
Assume MS-Kanji and X0201 kana input. It also accpet JIS.
AT&T EUC is recognized as X0201 kana. Without \-x flag,
X0201 kana is converted into X0208.
.TP
.B \-J
Assume  JIS input. It also accepts Japanese EUC.
This is the default. This flag does not excludde MS-Kanji.
.TP
.B \-E
Assume AT&T EUC input. It also accpet JIS.
Same as \-J.
.TP
.B \-B
Assume broken JIS-Kanji, which lost ESC.  Usefull when your site is 
using old B-News Nihongo patch. \-B1 allows any char after ESC-( or
ESC-$. \-B2 forces ASCII after NL.
.TP
.B \-O
Output result to file. The first name in arguments becomes output.
Please be careful. If there are no file arguments, nkf.out is chosen.
.TP
.B \-c
add CR after NL.
.TP
.B \-d
delete CR after NL.
.TP
.B -L[wmu] new line mode
.nf
    -Lu   unix (LF) 
    -Lw   windows (CRLF) 
    -Lm   mac (CR) 
default no conversion
.fl

.TP
.B --
long options
.nf
 --fj,--unix,--mac,--msdos, --windows
       convert for these system

 --jis,--euc,--sjis,--mime,--base64  
       convert for named code
 --jis-input,--euc-input,--sjis-input,--mime-input,--base64-input
       assume input system

 -- ignore rest of -option

 --help
 --version
.fl

.SH "FILES"
nkf - binary
.SH AUTHOR
Itaru Ichikawa <ichikawa@flab.fujitsu.co.jp>
(was ichikawa@fujitsu.JUNET)
.SH EDITOR
a_kuroe@hoffman.cc.sophia.ac.jp (Akihiko Kuroe)
kono@ie.u-ryukyu.ac.jp (Shinji KONO)
.SH BUGS
.B Nkf
cannot handle some input that contains mixed kanji codes.
Automatic code detection 
becomes very weak with \-x, \-X and \-S.