View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Dan Kogai > Encode-JIS2K-0.02 > Encode::JIS2K



Annotate this POD


New  2
Open  0
View/Report Bugs
Module Version: 0.02   Source   Latest Release: Encode-JIS2K-0.03


Encode::JIS2K - JIS X 0212 (aka JIS 2000) Encodings


  use Encode::JIS2K;
  use Encode qw/encode decode/;
  $euc_2k = encode("euc-jisx0213", $utf8);
  $utf8   = decode("euc-jisx0213", $euc_jp);


This module implements encodings that covers JIS X 0213 charset (AKA JIS 2000, hence the module name). Encodings supported are as follows.

  Canonical     Alias                                      Description
  euc-jisx0213  qr/\beuc.*jp[ \-]?(?:2000|2k)$/i          EUC-JISX0213 
                qr/\bjp.*euc[ \-]?(2000|2k)$/i 
                qr/\bujis[ \-]?(?:2000|2k)$/i
  shiftjisx0123 qr/\bshift.*jis(?:2000|2k)$/i           Shift_JISX0213
                qr/\bsjisp \-]?(?:2000|2k)$/i

  jis0213-1-raw                         JIS X 0213 plane 1, raw format
  jis0213-2-raw                         JIS X 0213 plane 2, raw format


To find out how to use this module in detail, see Encode.

what is JIS X 0213 anyway? ^

Simply put, JIS X 0213 is a rework and reorganization of JIS X 0208 and JIS X 0212. They consist of two 94x94 planes which roughly corrensponds as follows;

  JIS X 0213 Plane 1 = JIS X 0208 + extension
  JIS X 0213 Plane 2 = JIS X 0212 reorganized + extension

And here is the character repertoire there of at a glance.

          # of codepoints     Kuten Ku (rows) used
  JIS X 0208         6,879    1..8,16..83 
  JIS X 0213-1       8,762    1..94 (all!)
  JIS X 0212         6,067    2,6..7,9..11,16..77
  JIS X 0213-2       2,436    1,3..5,8,12..15,78..94
  (JIS X0213 Total) 11,197

JIS X 0213 was designed to extend JIS X 0208 and JIS X 0212 without being imcompatible to (classic) EUC-JP and Shift_JIS. The following characteristics are as a result thereof.

Note on EUC-JISX0213 (vs. EUC-JP)

As of Encode-1.64, 'euc-jp' does support euc-jisx0213 for decoding. However, 'euc-jp' in Encode and 'euc-jisx0213' differ as follows;

                    euc-jp                   euc-jisx0213
  Decodes....       (0201-K|0208|0212|0213)  ditto
  Round-Trip  (|0)  (020-K|0208|0212)        JIS X (0201-K|0213)
  Decode Only (|3)  those only found in 0213   
                                        those only found in 0212


Dan Kogai <>


Copyright 2002 by Dan Kogai <>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.



Encode, Encode::JP

Japanese Graphic Character Set for Information Interchange -- Plane 1

Japanese Graphic Character Set for Information Interchange -- Plane 2

syntax highlighting: