# Copyright (c) 1987, Fujitsu LTD. (Itaru ICHIKAWA).
-# Copyright (c) 1996-2009, The nkf Project.
+# Copyright (c) 1996-2018, The nkf Project.
# All rights reserved.
#
# This software is provided 'as-is', without any express or implied
@EXPORT = qw(
nkf nkf_continue inputcode
);
-$VERSION = '2.08';
+$VERSION = '2.15';
bootstrap NKF $VERSION;
__END__
#
-# =begin ¤«¤é =begin COMMAND ¤Þ¤Ç¤Ï Perl/NKF ¤Î¥É¥¥å¥á¥ó¥È
-# =begin COMMAND ¤«¤é =end ¤Þ¤Ç¤Ï nkf ¥³¥Þ¥ó¥É¤Î¥É¥¥å¥á¥ó¥È
+# =begin FUNC ¤«¤é =end FUNC ¤Þ¤Ç¤Ï Perl/NKF ¤Î¥É¥¥å¥á¥ó¥È
+# =begin COMMAND ¤«¤é =end COMMAND ¤Þ¤Ç¤Ï nkf ¥³¥Þ¥ó¥É¤Î¥É¥¥å¥á¥ó¥È
#
=head1 NAME
-=begin
+=begin FUNC
NKF - Perl extension for Network Kanji Filter
+=end FUNC
+
=begin COMMAND
nkf - Network Kanji Filter
-=end
+=end COMMAND
=head1 SYNOPSIS
-=begin
+=begin FUNC
use NKF;
$output = nkf("-s",$input);
+=end FUNC
+
=begin COMMAND
nkf B<[-butjnesliohrTVvwWJESZxXFfmMBOcdILg]> B<[>I<file ...>B<]>
-=end
+=end COMMAND
=head1 DESCRIPTION
-=begin
+=begin FUNC
-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.
-=end
+=end FUNC
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.
For automatic code detection, nkf assumes no X0201 kana in Shift_JIS.
To accept X0201 in Shift_JIS, use B<-X>, B<-x> or B<-S>.
-=head1 OPTIONS
+multiple options are specifed as seprate strings, such as
-=over
+ print nkf('--ic=UTF8-MAC', '-w', $string), "\n";
-=item B<-b -u>
+except the last arguments.
-Output is buffered (DEFAULT), Output is unbuffered.
-
-=item B<-j -s -e -w -w16>
+=head1 OPTIONS
-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.
+=over
-=item B<-J -S -E -W -W16>
+=item B<-J -S -E -W -W16 -W32 -j -s -e -w -w16 -w32>
-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.
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)
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.
=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]>
=item Shift_JIS
-a.k.a. SJIS, MS-Kanji
+a.k.a. SJIS, MS_Kanji
=item Windows-31J
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}>
Print nkf's version.
-=end
+=end COMMAND
=item B<-->
Copyright (c) 1987, Fujitsu LTD. (Itaru ICHIKAWA).
-Copyright (c) 1996-2009, The nkf Project. http://sourceforge.jp/projects/nkf
+Copyright (c) 1996-2018, The nkf Project.
-=begin
+=begin FUNC
=head1 SEE ALSO
perl(1). nkf(1)
-=end
+=end FUNC
=cut