OSDN Git Service

6e5c9fcc1ed239a63d152201001098e77c06aa45
[nkf/nkf.git] / NKF.mod / NKF.pm
1 ## Copyright (C) 1996,1998
2 ## Copyright (C) 2002
3 ## Ï¢ÍíÀ衧 Î°µåÂç³Ø¾ðÊ󹩳زʠ²ÏÌî ¿¿¼£  mime/X0208 support
4 ## ¡ÊE-Mail Address: kono@ie.u-ryukyu.ac.jp¡Ë
5 ## Ï¢ÍíÀ衧 COW for DOS & Win16 & Win32 & OS/2
6 ## ¡ÊE-Mail Address: GHG00637@niftyserve.or.p¡Ë
7 ##    
8 ##    ¤³¤Î¥½¡¼¥¹¤Î¤¤¤«¤Ê¤ëÊ£¼Ì¡¤²þÊÑ¡¤½¤Àµ¤âµöÂú¤·¤Þ¤¹¡£¤¿¤À¤·¡¢
9 ##    ¤½¤ÎºÝ¤Ë¤Ï¡¢Ã¯¤¬¹×¸¥¤·¤¿¤ò¼¨¤¹¤³¤ÎÉôʬ¤ò»Ä¤¹¤³¤È¡£
10 ##    ºÆÇÛÉۤ仨»ï¤ÎÉÕÏ¿¤Ê¤É¤ÎÌ䤤¹ç¤ï¤»¤âɬÍפ¢¤ê¤Þ¤»¤ó¡£
11 ##    ±ÄÍøÍøÍѤâ¾åµ­¤ËÈ¿¤·¤Ê¤¤ÈϰϤǵö²Ä¤·¤Þ¤¹¡£
12 ##    ¥Ð¥¤¥Ê¥ê¤ÎÇÛÉۤκݤˤÏversion message¤òÊݸ¤¹¤ë¤³¤È¤ò¾ò·ï¤È¤·¤Þ¤¹¡£
13 ##    ¤³¤Î¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ¤ÏÆä˲¿¤ÎÊݾڤ⤷¤Ê¤¤¡¢°­¤·¤«¤é¤º¡£
14 ##    
15 ##    Everyone is permitted to do anything on this program
16 ##    including copying, modifying, improving, 
17 ##    as long as you don't try to pretend that you wrote it.
18 ##    i.e., the above copyright notice has to appear in all copies.  
19 ##    Binar y distribution requires original version messages.
20 ##    You don't have to ask before copying, redistribution or publishing.
21 ##    THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
22
23
24 package NKF;
25
26 use strict;
27 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
28
29 require Exporter;
30 require DynaLoader;
31
32 @ISA = qw(Exporter DynaLoader);
33 # Items to export into callers namespace by default. Note: do not export
34 # names by default without a very good reason. Use EXPORT_OK instead.
35 # Do not simply export all your public functions/methods/constants.
36 @EXPORT = qw(
37         nkf     nkf_continue    inputcode
38 );
39 $VERSION = '2.05';
40
41 bootstrap NKF $VERSION;
42
43 # Preloaded methods go here.
44
45 # Autoload methods go after =cut, and are processed by the autosplit program.
46
47 1;
48 __END__
49 # Below is the stub of documentation for your module. You better edit it!
50
51 =head1 NAME
52
53 NKF - Perl extension for Network Kanji Filter 
54
55 =head1 SYNOPSIS
56
57   use NKF;
58   $output = nkf("-s",$input);
59
60 =head1 DESCRIPTION
61
62 This is a Perl Extension version of nkf (Netowrk Kanji Filter ) 1.7.
63 It converts the last argument and return converted result. Conversion
64 details are specified by flags before the last argument.
65
66 Flags:
67
68 C<b,u      Output is bufferred (DEFAULT),Output is unbufferred>
69
70 C<j,s,e    Outout code is JIS 7 bit (DEFAULT), Shift JIS, AT&T JIS (EUC)>
71
72 C<J,S,E    Input assumption is JIS 7 bit , Shift JIS, AT&T JIS (EUC)>
73
74 C<t        no conversion>
75
76 C<i_       Output sequence to designate JIS-kanji (DEFAULT B)>
77
78 C<o_       Output sequence to designate ASCII (DEFAULT B)>
79
80 C<r        {de/en}crypt ROT13/47>
81
82 C<m[BQ]    MIME decode [B:base64 stream,Q:quoted stream]>
83
84 C<l        ISO8859-1 (Latin-1) support>
85
86 C<f        Folding: C<-f60> or C<-f>>
87
88 C<Z[0-2]   Convert X0208 alphabet to ASCII  1: Kankaku to space,2: 2 spaces>
89
90 C<X,x      Assume X0201 kana in MS-Kanji, C<-x> preserves X0201>
91
92 C<B[0-2]   Broken input  0: missing ESC,1: any X on ESC-[($]-X,2: ASCII on NL>
93
94 C<d,c      Delete \r in line feed, Add \r in line feed>
95
96
97 C<m0 No MIME decode.>
98
99 C<M MIME encode. Header style. All ASCII code and control characters are intact.>
100
101 C<MB MIME encode.  Base64 stream. Kanji conversion is performed before encoding, so this cannot be used as a picture encoder.>
102
103 C<l Input and output code is ISO8859-1 (Latin-1) and ISO-2022-JP.>
104
105 C<L[wmu] new line mode>
106
107 C<    -Lu   unix (LF) >
108
109 C<    -Lw   windows (CRLF) >
110
111 C<    -Lm   mac (CR) >
112
113 C< --fj,--unix,--mac,--msdos, --windows convert for these system>
114
115 C< --jis,--euc,--sjis,--mime,--base64  convert for named code>
116
117 C< --jis-input,--euc-input,--sjis-input,--mime-input,--base64-input assume input system>
118
119 C< -- ignore rest of -option>
120
121 C< --help>
122
123 C< --version>
124
125 =head1 AUTHOR
126
127 Network Kanji Filter Version 1.9 (2/0002/Shinji Kono) 
128 Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa),1998 S. Kono, COW
129
130 =head1 SEE ALSO
131
132 perl(1).   nkf(1)
133
134 =cut