1nkf(1)                                                                  nkf(1)
2
3
4

NAME

6       nkf - Network Kanji Filter
7

SYNOPSIS

9       nkf [-butjnesliohrTVvwWJESZxXFfmMBOcdILg] [file ...]
10

DESCRIPTION

12       Nkf is a yet another kanji code converter among networks, hosts and
13       terminals.  It converts input kanji code to designated kanji code such
14       as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16 or UTF-32.
15
16       One of the most unique faculty of nkf is the guess of the input kanji
17       encodings.  It currently recognizes ISO-2022-JP, Shift_JIS, EUC-JP,
18       UTF-8, UTF-16 and UTF-32.  So users needn't set the input kanji code
19       explicitly.
20
21       By default, X0201 kana is converted into X0208 kana.  For X0201 kana,
22       SO/SI, SSO and ESC-(-I methods are supported.  For automatic code
23       detection, nkf assumes no X0201 kana in Shift_JIS.  To accept X0201 in
24       Shift_JIS, use -X, -x or -S.
25

OPTIONS

27       -J -S -E -W -W16 -W32 -j -s -e -w -w16 -w32
28           Specify input and output encodings. Upper case is input.  cf. --ic
29           and --oc.
30
31           -J  ISO-2022-JP (JIS code).
32
33           -S  Shift_JIS and JIS X 0201 kana.  EUC-JP is recognized as X0201
34               kana. Without -x flag, JIS X 0201 Katakana (a.k.a.halfwidth
35               kana) is converted into JIS X 0208.  If you use Windows, see
36               Windows-31J (CP932).
37
38           -E  EUC-JP.
39
40           -W  UTF-8N.
41
42           -W16[BL][0]
43               UTF-16.  B or L gives whether Big Endian or Little Endian.  0
44               gives whther put BOM or not.
45
46           -W32[BL][0]
47               UTF-32.  B or L gives whether Big Endian or Little Endian.  0
48               gives whther put BOM or not.
49
50       -b -u
51           Output is buffered (DEFAULT), Output is unbuffered.
52
53       -t  No conversion.
54
55       -i[@B]
56           Specify the escape sequence for JIS X 0208.
57
58           -i@ Use ESC ( @. (JIS X 0208-1978)
59
60           -iB Use ESC ( B. (JIS X 0208-1983/1990 DEFAULT)
61
62       -o[BJ]
63           Specify the escape sequence for US-ASCII/JIS X 0201 Roman. (DEFAULT
64           B)
65
66       -r  {de/en}crypt ROT13/47
67
68       -h[123] --hiragana --katakana --katakana-hiragana
69           -h1 --hiragana
70               Katakana to Hiragana conversion.
71
72           -h2 --katakana
73               Hiragana to Katakana conversion.
74
75           -h3 --katakana-hiragana
76               Katakana to Hiragana and Hiragana to Katakana conversion.
77
78       -T  Text mode output (MS-DOS)
79
80       -f[m [- n]]
81           Folding on m length with n margin in a line.  Without this option,
82           fold length is 60 and fold margin is 10.
83
84       -F  New line preserving line folding.
85
86       -Z[0-3]
87           Convert X0208 alphabet (Fullwidth Alphabets) to ASCII.
88
89           -Z -Z0
90               Convert X0208 alphabet to ASCII.
91
92           -Z1 Convert X0208 kankaku to single ASCII space.
93
94           -Z2 Convert X0208 kankaku to double ASCII spaces.
95
96           -Z3 Replacing fullwidth >, <, ", & into '&gt;', '&lt;', '&quot;',
97               '&amp;' as in HTML.
98
99       -X -x
100           With -X or without this option, X0201 is converted into X0208 Kana.
101           With -x, try to preserve X0208 kana and do not convert X0201 kana
102           to X0208.  In JIS output, ESC-(-I is used. In EUC output, SS2 is
103           used.
104
105       -B[0-2]
106           Assume broken JIS-Kanji input, which lost ESC.  Useful when your
107           site is using old B-News Nihongo patch.
108
109           -B1 allows any chars after ESC-( or ESC-$.
110
111           -B2 force ASCII after NL.
112
113       -I  Replacing non iso-2022-jp char into a geta character (substitute
114           character in Japanese).
115
116       -m[BQN0]
117           MIME ISO-2022-JP/ISO8859-1 decode. (DEFAULT) To see ISO8859-1
118           (Latin-1) -l is necessary.
119
120           -mB Decode MIME base64 encoded stream. Remove header or other part
121               before conversion.
122
123           -mQ Decode MIME quoted stream. '_' in quoted stream is converted to
124               space.
125
126           -mN Non-strict decoding.  It allows line break in the middle of the
127               base64 encoding.
128
129           -m0 No MIME decode.
130
131       -M  MIME encode. Header style. All ASCII code and control characters
132           are intact.
133
134           -MB MIME encode Base64 stream.  Kanji conversion is performed
135               before encoding, so this cannot be used as a picture encoder.
136
137           -MQ Perform quoted encoding.
138
139       -l  Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.  -s,
140           -e and -x are not compatible with this option.
141
142       -L[uwm] -d -c
143           Convert line breaks.
144
145           -Lu -d
146               unix (LF)
147
148           -Lw -c
149               windows (CRLF)
150
151           -Lm mac (CR)
152
153               Without this option, nkf doesn't convert line breaks.
154
155       --fj --unix --mac --msdos --windows
156           Convert for these systems.
157
158       --jis --euc --sjis --mime --base64
159           Convert to named code.
160
161       --jis-input --euc-input --sjis-input --mime-input --base64-input
162           Assume input system
163
164       --ic=input codeset --oc=output codeset
165           Set the input or output codeset.  NKF supports following codesets
166           and those codeset names are case insensitive.
167
168           ISO-2022-JP
169               a.k.a. RFC1468, 7bit JIS, JUNET
170
171           EUC-JP (eucJP-nkf)
172               a.k.a. AT&T JIS, Japanese EUC, UJIS
173
174           eucJP-ascii
175           eucJP-ms
176           CP51932
177               Microsoft Version of EUC-JP.
178
179           Shift_JIS
180               a.k.a. SJIS, MS_Kanji
181
182           Windows-31J
183               a.k.a. CP932
184
185           UTF-8
186               same as UTF-8N
187
188           UTF-8N
189               UTF-8 without BOM
190
191           UTF-8-BOM
192               UTF-8 with BOM
193
194           UTF8-MAC (input only)
195               decomposed UTF-8
196
197           UTF-16
198               same as UTF-16BE
199
200           UTF-16BE
201               UTF-16 Big Endian without BOM
202
203           UTF-16BE-BOM
204               UTF-16 Big Endian with BOM
205
206           UTF-16LE
207               UTF-16 Little Endian without BOM
208
209           UTF-16LE-BOM
210               UTF-16 Little Endian with BOM
211
212           UTF-32
213               same as UTF-32BE
214
215           UTF-32BE
216               UTF-32 Big Endian without BOM
217
218           UTF-32BE-BOM
219               UTF-32 Big Endian with BOM
220
221           UTF-32LE
222               UTF-32 Little Endian without BOM
223
224           UTF-32LE-BOM
225               UTF-32 Little Endian with BOM
226
227       --fb-{skip, html, xml, perl, java, subchar}
228           Specify the way that nkf handles unassigned characters.  Without
229           this option, --fb-skip is assumed.
230
231       --prefix=escape charactertarget character..
232           When nkf converts to Shift_JIS, nkf adds a specified escape charac‐
233           ter to specified 2nd byte of Shift_JIS characters.  1st byte of
234           argument is the escape character and following bytes are target
235           characters.
236
237       --no-cp932ext
238           Handle the characters extended in CP932 as unassigned characters.
239
240       --no-best-fit-chars
241           When Unicode to Encoded byte conversion, don't convert characters
242           which is not round trip safe.  When Unicode to Unicode conversion,
243           with this and -x option, nkf can be used as UTF converter.  (In
244           other words, without this and -x option, nkf doesn't save some
245           characters)
246
247           When nkf converts strings that related to path, you should use this
248           opion.
249
250       --cap-input
251           Decode hex encoded characters.
252
253       --url-input
254           Unescape percent escaped characters.
255
256       --numchar-input
257           Decode character reference, such as "&#....;".
258
259       --in-place[=SUFFIX]  --overwrite[=SUFFIX]
260           Overwrite original listed files by filtered result.
261
262           Note --overwrite preserves timestamps of original files.
263
264       --guess=[12]
265           Print guessed encoding and newline. (2 is default, 1 is only encod‐
266           ing)
267
268       --help
269           Print nkf's help.
270
271       --version
272           Print nkf's version.
273
274       --  Ignore rest of -option.
275

AUTHOR

277       Copyright (c) 1987, Fujitsu LTD. (Itaru ICHIKAWA).
278
279       Copyright (c) 1996-2010, The nkf Project.
280
281
282
283nkf 2.1.2                         2011-09-08                            nkf(1)
Impressum