Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / Encode / JP.html
blob71bb78e6b0ef1b71c507b4c4b5782be1b2334cd9
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>Encode::JP - Japanese Encodings</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;Encode::JP - Japanese Encodings</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsis">SYNOPSIS</a></li>
24 <li><a href="#abstract">ABSTRACT</a></li>
25 <li><a href="#description">DESCRIPTION</a></li>
26 <li><a href="#note_on_iso2022jp_1_">Note on ISO-2022-JP(-1)?</a></li>
27 <li><a href="#bugs">BUGS</a></li>
28 <li><a href="#see_also">SEE ALSO</a></li>
29 </ul>
30 <!-- INDEX END -->
32 <hr />
33 <p>
34 </p>
35 <h1><a name="name">NAME</a></h1>
36 <p>Encode::JP - Japanese Encodings</p>
37 <p>
38 </p>
39 <hr />
40 <h1><a name="synopsis">SYNOPSIS</a></h1>
41 <pre>
42 use Encode qw/encode decode/;
43 $euc_jp = encode(&quot;euc-jp&quot;, $utf8); # loads Encode::JP implicitly
44 $utf8 = decode(&quot;euc-jp&quot;, $euc_jp); # ditto</pre>
45 <p>
46 </p>
47 <hr />
48 <h1><a name="abstract">ABSTRACT</a></h1>
49 <p>This module implements Japanese charset encodings. Encodings
50 supported are as follows.</p>
51 <pre>
52 Canonical Alias Description
53 --------------------------------------------------------------------
54 euc-jp /\beuc.*jp$/i EUC (Extended Unix Character)
55 /\bjp.*euc/i
56 /\bujis$/i
57 shiftjis /\bshift.*jis$/i Shift JIS (aka MS Kanji)
58 /\bsjis$/i
59 7bit-jis /\bjis$/i 7bit JIS
60 iso-2022-jp ISO-2022-JP [RFC1468]
61 = 7bit JIS with all Halfwidth Kana
62 converted to Fullwidth
63 iso-2022-jp-1 ISO-2022-JP-1 [RFC2237]
64 = ISO-2022-JP with JIS X 0212-1990
65 support. See below
66 MacJapanese Shift JIS + Apple vendor mappings
67 cp932 /\bwindows-31j$/i Code Page 932
68 = Shift JIS + MS/IBM vendor mappings
69 jis0201-raw JIS0201, raw format
70 jis0208-raw JIS0201, raw format
71 jis0212-raw JIS0201, raw format
72 --------------------------------------------------------------------</pre>
73 <p>
74 </p>
75 <hr />
76 <h1><a name="description">DESCRIPTION</a></h1>
77 <p>To find out how to use this module in detail, see <a href="file://C|\msysgit\mingw\html/lib/Encode.html">the Encode manpage</a>.</p>
78 <p>
79 </p>
80 <hr />
81 <h1><a name="note_on_iso2022jp_1_">Note on ISO-2022-JP(-1)?</a></h1>
82 <p>ISO-2022-JP-1 (RFC2237) is a superset of ISO-2022-JP (RFC1468) which
83 adds support for JIS X 0212-1990. That means you can use the same
84 code to decode to utf8 but not vice versa.</p>
85 <pre>
86 $utf8 = decode('iso-2022-jp-1', $stream);</pre>
87 <p>and</p>
88 <pre>
89 $utf8 = decode('iso-2022-jp', $stream);</pre>
90 <p>yield the same result but</p>
91 <pre>
92 $with_0212 = encode('iso-2022-jp-1', $utf8);</pre>
93 <p>is now different from</p>
94 <pre>
95 $without_0212 = encode('iso-2022-jp', $utf8 );</pre>
96 <p>In the latter case, characters that map to 0212 are first converted
97 to U+3013 (0xA2AE in EUC-JP; a white square also known as 'Tofu' or
98 'geta mark') then fed to the decoding engine. U+FFFD is not used,
99 in order to preserve text layout as much as possible.</p>
101 </p>
102 <hr />
103 <h1><a name="bugs">BUGS</a></h1>
104 <p>The ASCII region (0x00-0x7f) is preserved for all encodings, even
105 though this conflicts with mappings by the Unicode Consortium. See</p>
106 <p><a href="http://www.debian.or.jp/~kubota/unicode-symbols.html.en">http://www.debian.or.jp/~kubota/unicode-symbols.html.en</a></p>
107 <p>to find out why it is implemented that way.</p>
109 </p>
110 <hr />
111 <h1><a name="see_also">SEE ALSO</a></h1>
112 <p><a href="file://C|\msysgit\mingw\html/lib/Encode.html">the Encode manpage</a></p>
113 <table border="0" width="100%" cellspacing="0" cellpadding="3">
114 <tr><td class="block" style="background-color: #cccccc" valign="middle">
115 <big><strong><span class="block">&nbsp;Encode::JP - Japanese Encodings</span></strong></big>
116 </td></tr>
117 </table>
119 </body>
121 </html>