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">
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:" />
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"> Encode::JP - Japanese Encodings
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
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>
35 <h1><a name=
"name">NAME
</a></h1>
36 <p>Encode::JP - Japanese Encodings
</p>
40 <h1><a name=
"synopsis">SYNOPSIS
</a></h1>
42 use Encode qw/encode decode/;
43 $euc_jp = encode(
"euc-jp
", $utf8); # loads Encode::JP implicitly
44 $utf8 = decode(
"euc-jp
", $euc_jp); # ditto
</pre>
48 <h1><a name=
"abstract">ABSTRACT
</a></h1>
49 <p>This module implements Japanese charset encodings. Encodings
50 supported are as follows.
</p>
52 Canonical Alias Description
53 --------------------------------------------------------------------
54 euc-jp /\beuc.*jp$/i EUC (Extended Unix Character)
57 shiftjis /\bshift.*jis$/i Shift JIS (aka MS Kanji)
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
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>
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>
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>
86 $utf8 = decode('iso-
2022-jp-
1', $stream);
</pre>
89 $utf8 = decode('iso-
2022-jp', $stream);
</pre>
90 <p>yield the same result but
</p>
92 $with_0212 = encode('iso-
2022-jp-
1', $utf8);
</pre>
93 <p>is now different from
</p>
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>
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>
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"> Encode::JP - Japanese Encodings
</span></strong></big>