OSDN Git Service

Release 2.1.2.
[nkf/nkf.git] / NKF.mod / NKF.pm
index 614a8b4..0e5003b 100644 (file)
@@ -1,5 +1,5 @@
 # Copyright (c) 1987, Fujitsu LTD. (Itaru ICHIKAWA).
-# Copyright (c) 1996-2009, The nkf Project.
+# Copyright (c) 1996-2010, The nkf Project.
 # All rights reserved.
 #
 # This software is provided 'as-is', without any express or implied
@@ -35,7 +35,7 @@ require DynaLoader;
 @EXPORT = qw(
        nkf     nkf_continue    inputcode
 );
-$VERSION = '2.08';
+$VERSION = '2.12';
 
 bootstrap NKF $VERSION;
 
@@ -80,7 +80,7 @@ nkf B<[-butjnesliohrTVvwWJESZxXFfmMBOcdILg]> B<[>I<file ...>B<]>
 
 =begin
 
-This is a Perl Extension version of nkf (Netowrk Kanji Filter).
+This is a Perl Extension version of nkf (Network Kanji Filter).
 It converts the last argument and return converted result. Conversion
 details are specified by flags before the last argument.
 
@@ -88,10 +88,10 @@ details are specified by flags before the last argument.
 
 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 ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 or UTF-16.
+such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16 or UTF-32.
 
 One of the most unique faculty of B<nkf> is the guess of the input kanji encodings.
-It currently recognizes ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8 and UTF-16.
+It currently recognizes ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16 and UTF-32.
 So users needn't set the input kanji code explicitly.
 
 By default, X0201 kana is converted into X0208 kana.
@@ -103,40 +103,50 @@ To accept X0201 in Shift_JIS, use B<-X>, B<-x> or B<-S>.
 
 =over
 
-=item B<-b -u>
-
-Output is buffered (DEFAULT), Output is unbuffered.
-
-=item B<-j -s -e -w -w16>
+=item B<-J -S -E -W -W16 -W32 -j -s -e -w -w16 -w32>
 
-Output code is ISO-2022-JP (7bit JIS), Shift_JIS, EUC-JP,
-UTF-8N, UTF-16BE.
-Without this option and compile option, ISO-2022-JP is assumed.
-
-=item B<-J -S -E -W -W16>
-
-Input assumption is JIS 7 bit, Shift_JIS, EUC-JP,
-UTF-8, UTF-16LE.
+Specify input and output encodings. Upper case is input.
+cf. --ic and --oc.
 
 =over
 
 =item B<-J>
 
-Assume  JIS input.
-This is the default.
+ISO-2022-JP (JIS code).
 
 =item B<-S>
 
-Assume Shift_JIS and JIS X 0201 kana input.
+Shift_JIS and JIS X 0201 kana.
 EUC-JP is recognized as X0201 kana. Without B<-x> flag,
 JIS X 0201 Katakana (a.k.a.halfwidth kana) is converted into JIS X 0208.
+If you use Windows, see Windows-31J (CP932).
 
 =item B<-E>
 
-Assume EUC-JP input.
+EUC-JP.
+
+=item B<-W>
+
+UTF-8N.
+
+=item B<-W16[BL][0]>
+
+UTF-16.
+B or L gives whether Big Endian or Little Endian.
+0 gives whther put BOM or not.
+
+=item B<-W32[BL][0]>
+
+UTF-32.
+B or L gives whether Big Endian or Little Endian.
+0 gives whther put BOM or not.
 
 =back
 
+=item B<-b -u>
+
+Output is buffered (DEFAULT), Output is unbuffered.
+
 =item B<-t>
 
 No conversion.
@@ -155,6 +165,8 @@ Use ESC ( @. (JIS X 0208-1978)
 
 Use ESC ( B. (JIS X 0208-1983/1990 DEFAULT)
 
+=back
+
 =item B<-o[BJ]>
 
 Specify the escape sequence for US-ASCII/JIS X 0201 Roman. (DEFAULT B)
@@ -185,10 +197,6 @@ Katakana to Hiragana and Hiragana to Katakana conversion.
 
 Text mode output (MS-DOS)
 
-=item B<-l>
-
-ISO8859-1 (Latin-1) support
-
 =item B<-f[I<m> [- I<n>]]>
 
 Folding on I<m> length with I<n> margin in a line.
@@ -224,10 +232,9 @@ Replacing fullwidth >, <, ", & into '&gt;', '&lt;', '&quot;', '&amp;' as in HTML
 
 =item B<-X -x>
 
-Assume X0201 kana in MS-Kanji.
 With B<-X> or without this option, X0201 is converted into X0208 Kana.
 With B<-x>, try to preserve X0208 kana and do not convert X0201 kana to X0208.
-In JIS output, ESC-(-I is used. In EUC output, SSO is used.
+In JIS output, ESC-(-I is used. In EUC output, SS2 is used.
 
 =item B<-B[0-2]>
 
@@ -359,7 +366,7 @@ Microsoft Version of EUC-JP.
 
 =item Shift_JIS
 
-a.k.a. SJIS, MS-Kanji
+a.k.a. SJIS, MS_Kanji
 
 =item Windows-31J
 
@@ -401,6 +408,26 @@ UTF-16 Little Endian without BOM
 
 UTF-16 Little Endian with BOM
 
+=item UTF-32
+
+same as UTF-32BE
+
+=item UTF-32BE
+
+UTF-32 Big Endian without BOM
+
+=item UTF-32BE-BOM
+
+UTF-32 Big Endian with BOM
+
+=item UTF-32LE
+
+UTF-32 Little Endian without BOM
+
+=item UTF-32LE-BOM
+
+UTF-32 Little Endian with BOM
+
 =back
 
 =item B<--fb-{skip, html, xml, perl, java, subchar}>
@@ -472,7 +499,7 @@ Ignore rest of -option.
 
 Copyright (c) 1987, Fujitsu LTD. (Itaru ICHIKAWA).
 
-Copyright (c) 1996-2009, The nkf Project.  http://sourceforge.jp/projects/nkf
+Copyright (c) 1996-2010, The nkf Project.
 
 =begin