1Jcode::Nihongo(3)     User Contributed Perl Documentation    Jcode::Nihongo(3)
2
3
4

XX

6       Jcode - XXXXXXXXXXX
7

XX

9        use Jcode;
10        #
11        # XXXXXX
12        Jcode::convert($str, $ocode, $icode, "z");
13        # XXXXXXXXXXXXXX
14        print Jcode->new($str)->h2z->tr($from, $to)->utf8;
15

XX

17       Jcode.pmXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
18       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
19
20         $iso_2022_jp = Jcode->new($str)->h2z->jis;
21
22       XXXXXXXXXXXXXXX
23
24         $iso_2022_jp = $str;
25         &jcode::convert(\$iso_2022_jp, 'jis', &jcode::getcode(\$str), "z");
26
27       XXXXXXXXXXXXXXXXXXXJcode.pmXXX"getcode()"X "convert()"XXXXXXXXXXX
28
29       PerlXXXXXXX5.8.1XXXXXJcodeXXPerl 5.8XXXXXXXXXXX
30       XXXXXXXXXXXXEncodeXXXXXXXXXXXXXXX
31

XXXX

33       XXXXXXXXXXXXXXXXXXXXXXXJcodeXXXXXXXXXXXX
34
35   XXXXXXX
36       $j = Jcode->new($str [, $icode])
37         $strXXJcodeXXXXXX$jXXXXXXXXXXX$icodeXXXXXXXXXX
38         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX getcodeXXXXXXXXXX
39
40         Perl 5.8.1XXXXX$icodeXXEncodeXXXXXX XXXXXXXXXXXXXXXXXX
41
42           $j = Jcode->new($european, 'iso-latin1');
43
44         XXXXXXXXXXXXXXXEUCXXXXXXXXXXXXXXXXXXX "print $j->euc"XXXXXXXX"print
45         $j"XXXXXX
46
47         XXXXXXXX
48           XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
49
50            Jcode->new(\$str);
51
52           XXXXXXXXXXXXXXXXXXXXXXXXX$strXXXXXXX
53           XXXXXXXXXXXX$strXjcodeXXXXXXX"tieXXX"XXXXX
54
55       $j->set($str [, $icode])
56         $jXXXXXXX$strXXXXXXXXXXXXJcodeXXXXXXXXXXXX
57         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
58
59          # mailboxXSJISXXXXX
60          my $jconv = new Jcode;
61          $/ = 00;
62          while(<>){
63              print $jconv->set(\$_)->mime_decode->sjis;
64          }
65
66       $j->append($str [, $icode]);
67         $jXXXXXXX$strXXXXXX
68
69       $j = jcode($str [, $icode]);
70         Jcode->new() XXXXXXXXXXXXXXXX
71
72          $sjis = jcode($str)->sjis;
73
74   XXXXXXXXX
75       XXXX$j->encodedXXXXXXencodedXXXXXXXXXXXXXX
76
77       $sjis = $j->sjis
78       $euc = $j->euc
79       $jis = $j->jis
80       $sjis = $j->sjis
81       $ucs2 = $j->ucs2
82       $utf8 = $j->utf8
83         XXXXXXX WYCIWYG = What you code is what you get :)
84
85       $iso_2022_jp = $j->iso_2022_jp
86         "$j->h2z->jis"XXXXXX XXXXXXXXXXXXXXXXXXX
87
88         Perl 5.8.1XXXXXEncodeXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX
89
90           $european = $j->iso_latin1; # XXXXXXX'-'X'_'XXXXXXX
91
92         XXXEncode::EncoderXXXXXXXXXXXXXXXX
93
94         $j->fallback($fallback)
95           Perl 5.8.1XXXXXJcodeXXXXXXXXUTF-8XXXXXXX
96           -E<gt>encodingXXXXXXXXXXX'?'XXXXXXXXXXX XXXEncodeXXXXXXXXX
97
98             my $unistr = "\x{262f}"; # XXXXX
99             my $j = jcode($unistr);  # $j->euc XXXX '?' X
100
101           XXXXXXXXEncodeXXXXXXXXXXXXXXXXXXXXXXXXX
102           XXEncodeXXXXXXXXXXXXXXX"Jcode::FB_PERLQQ"X
103           "Jcode::FB_XMLCREF"X"Jcode::FB_HTMLCREF"XEncodeXXXXXX XXXXXXXXXXXXX
104
105             print $j->fallback(Jcode::FB_PERLQQ)->euc;   # '\x{262f}'
106             print $j->fallback(Jcode::FB_XMLCREF)->euc;  # '&#x262f;'
107             print $j->fallback(Jcode::FB_HTMLCREF)->euc; # '&#9775;'
108
109           XXXXXXX$Jcode::FALLBACKXXXXXXXXXXXXXXXXX
110           XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
111
112             $Jcode::FALLBACK = Jcode::FB_PERLQQ; # XXXXXXXXXXXXXXXXXXXX
113
114       [@lines =] $jcode->jfold([$width, $newline_str, $kref])
115         $widthXXXXXXX72XXXjcodeXXXXXXXXXXXXXX
116         $widthXXXXXXXXXXXXXXXXX2XXXXXXXXXXXXX
117
118         $newline_strXXXXXXX"\n"XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX
119
120         Perl 5.8.1XXX3XXXXX$krefXEUCXXXXXXXXXXXXXX
121         XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
122
123       $length = $jcode->jlength();
124         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
125
126   MIME::Base64XXXXXXX
127       XXXXXXXXXXXXXMIME::Base64XXXXXXXXXXXXXXXX
128
129          perl -MCPAN -e 'CPAN::Shell->install("MIME::Base64")'
130
131       XXXXXXXXXPerlX5.6XXXXXXXXMIME::Base64X XXXXXXXXXXXXXXXXXXXXXXXXXXXX
132
133       $mime_header = $j->mime_encode([$lf, $bpl])
134         $strXRFC1522XXXMIME-HeaderXXXXXXX$lfXXXXXXX
135         XXXXXXX$lfXXXXXXXXXXXXX\nXX $bplXXXXXXXXXXXXXXXX$bplXXXXXXXXXXXXX76X
136         XXXXX76XXXXXXXXXXXXXX
137
138         Perl 5.8.1XXXXXXXXXXXXXXMIME HeaderXXXXXXXXXXX
139
140           $mime_header = $j->MIME_Header;
141
142         XXXX$mime_headerXXXXXMIME-B-encoded UTF-8XXXXXX
143         XXX"$j->mime_encode()"XMIME-B-encoded ISO-2022-JPXXXXXX
144         XXXXXXXXXXXXXXXXXXXXXXXXXXX
145
146       $j->mime_decode;
147         JcodeXXXXXXXXXXXXXMIME-HeaderXXXXXXXXPerl 5.8.1
148         XXXXXXXXXXXXXXXXXXXXXXX
149
150           Jcode->new($str, 'MIME-Header');
151
152         XXXXXXXISO-2022-JPXXXXXXUTF-8XXXXXXXXXXX XXXMIME B EncodingXXXXXMIME
153         Q EncodingXXXXXXXX XXXPerl 5.8.1XXXXXXXXXXXXXXXXXXX
154
155   XX XX XX
156       $j->h2z([$keep_dakuten])
157         X201XXXXXXXX208XXXXXXXXXXXXX $keep_dakutenXXXXXXXXXXXXXXXXXXXXXX
158         (XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXX)
159
160         $j->nmatchXXXXXXXXXXXXXXXXXX
161
162       $j->z2h
163         X208XXXXXXXX201XXXXXXXXXXXXX
164
165         $j->nmatchXXXXXXXXXXXXXXXXXX
166
167   XXXXXXXXXX
168       "-E<gt>m()"X"-E<gt>s()"XXXXXXPerl 5.8.1XXX XXXXX
169
170       $j->tr($from, $to, $opt);
171         JcodeXXXXXXX"tr/$from/$to/"XXXXXXX$fromX$toX EUC-JPXXXXXXXPerl
172         5.8.1XXXXXflagXXXUTF-8XXX XXXXXXXX
173
174         $optXXXXXXXX"tr/$from/$to/$opt"XXXXXXXX$optX
175         'c'X'd'XXXXXXXXXXXXXXXXXXXXXXXX
176
177         $j->nmatchXXXXXXXXXXXXXXXXXX
178
179         Perl 5.8.1XXXXXtrXXXXXXXXXXXXX->error_trXXXXX $@XXXXXXXX
180
181         XXXXXXXXPerl 5.8.1XXXXXXXXXXXX
182
183       $j->s($patter, $replace, $opt);
184         XXX"s/$pattern/$replace/$opt"XXXXXXX$optXXXXXXXXXXX
185         XXXXXXXXXXXXXXXXXXXXperlreXXXXXXXX
186
187         "$j->tr()"X"$j->s()"XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX
188
189           $j->tr("A-Z", "a-z")->s("foo", "bar");
190
191       [@match = ] $j->m($pattern, $opt);
192         "m/$patter/$opt"XXXXXXXXXXXXXXXXXXXXXXXXXXX
193         XXX"$j->s()"XXXXXXXXXXXXXXXXXXXXXXXXXXX
194
195         XXXXXXXXXXXXXXXXX->error_mX->error_sXXXX $@XXXXXXXX
196
197   XXXXXXXX
198       XXJcodeXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
199       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXOOP XXXX
200
201       XXXXXXJcodeXXXXXXXXXXXXXXXXXXXXXXXXXXXX
202       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXX
203       XXXXXXXXXOOPXXXXXX
204
205       Perl 5.8.1XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXJcodeXXXXXXXXXXXXXXXXX
206
207       $j->r_str
208         EUCXXXXXXXXXXXX
209
210         Perl 5.8.1XXXXUTF-8XXXXXXXUTF-8XXXXXXXXXXXXXX
211
212       $j->icode
213         XXXXXXXXXXXXXXXXX
214
215       $j->nmatch
216         XXXXXXX$j->trXXXXXXXXX
217

XXXXXX

219       ($code, [$nmatch]) = getcode($str)
220         $strXXXXXXXXXXXXXXXXXXXXXXXXXX
221
222          ascii   Ascii XXXXXXXXXXXXX
223          binary  Binary XXXXXXXXXXXXXX
224          euc     EUC-JP
225          sjis    SHIFT_JIS
226          jis     JIS (ISO-2022-JP)
227          ucs2    UCS2 (Raw Unicode)
228          utf8    UTF8
229
230         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
231         XXXXXXXXXXXXXXXXXXXXXXXXXXXX$strX\$str XXXXXXXX
232
233         jcode.pl XXXXXXX XXXXXjcode::getcode()X100%XXXXX XXXXXXXXXXXX100%X
234
235          * XXXXXXXXXXXXXXXXXXXXXX
236            jcode::getcode()X$nmatchXXXXXXXXX
237
238          * jcode::getcode()XXEUCXXXSJISXXXXXXXXXXX'undef'X
239            XXXXX Jcode::getcode()XEUCXXXXXXXXXJcode.pmXX
240            XXXXXXXXXX
241
242       Jcode::convert($str, [$ocode, $icode, $opt])
243         $strX$ocodeXXXXXXXXXXXXXXXXX$icodeXXXXXXX
244         XXXXXXgetcode()XXXXXXXXXXXX$icodeXXXXXXX
245         XXXXXXXXXXX$strX\$strXXXXXXXX
246
247         jcode.pl XXXXXXX XXXXXjcode::convert()X100%XXXXX XXXXX
248

XX

250       PerlX5.8.1XXXXXXJcodeXEncodeXXXXXXXXXXXXXXX
251       XXXXJcodeXEncodeXXXXXXXXXXXXX
252

XX

254       XXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX XX
255       <utashiro@iij.ad.jp>XXPerl4XXXXXjcode.plXXXXXXXX
256
257       XX XX <ohzaki@iod.ricoh.co.jp>XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX
258
259       makamaka@donzoko.net X JEncode XXXJcodeXEncodeXXXXXXXXX
260       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXX
261
262       XXXJcode ML <jcode5@ring.gr.jp>XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX
263

XX

265       Encode
266
267       http://www.iana.org/assignments/character-sets
268       <http://www.iana.org/assignments/character-sets>
269

XXX

271       Copyright 1999-2005 Dan Kogai <dankogai@dan.co.jp>
272
273       This library is free software; you can redistribute it and/or modify it
274       under the same terms as Perl itself.
275
276
277
278perl v5.12.0                      2010-05-02                 Jcode::Nihongo(3)
Impressum