source: for-distributions/trunk/bin/windows/perl/lib/Encode/CJKConstants.pm@ 14489

Last change on this file since 14489 was 14489, checked in by oranfry, 17 years ago

upgrading to perl 5.8

File size: 1.7 KB
Line 
1#
2# $Id: CJKConstants.pm,v 2.0 2004/05/16 20:55:16 dankogai Exp $
3#
4
5package Encode::CJKConstants;
6
7use strict;
8
9our $RCSID = q$Id: CJKConstants.pm,v 2.0 2004/05/16 20:55:16 dankogai Exp $;
10our $VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
11
12use Carp;
13
14require Exporter;
15our @ISA = qw(Exporter);
16our @EXPORT = qw();
17our @EXPORT_OK = qw(%CHARCODE %ESC %RE);
18our %EXPORT_TAGS = ( 'all' => [ @EXPORT_OK, @EXPORT ] );
19
20my %_0208 = (
21 1978 => '\e\$\@',
22 1983 => '\e\$B',
23 1990 => '\e&\@\e\$B',
24 );
25
26our %CHARCODE = (
27 UNDEF_EUC => "\xa2\xae", # ¢® in EUC
28 UNDEF_SJIS => "\x81\xac", # ¢® in SJIS
29 UNDEF_JIS => "\xa2\xf7", # ¢÷ -- used in unicode
30 UNDEF_UNICODE => "\x20\x20", # ¢÷ -- used in unicode
31 );
32
33our %ESC = (
34 GB_2312 => "\e\$A",
35 JIS_0208 => "\e\$B",
36 JIS_0212 => "\e\$(D",
37 KSC_5601 => "\e\$(C",
38 ASC => "\e\(B",
39 KANA => "\e\(I",
40 '2022_KR' => "\e\$)C",
41 );
42
43our %RE =
44 (
45 ASCII => '[\x00-\x7f]',
46 BIN => '[\x00-\x06\x7f\xff]',
47 EUC_0212 => '\x8f[\xa1-\xfe][\xa1-\xfe]',
48 EUC_C => '[\xa1-\xfe][\xa1-\xfe]',
49 EUC_KANA => '\x8e[\xa1-\xdf]',
50 JIS_0208 => "$_0208{1978}|$_0208{1983}|$_0208{1990}",
51 JIS_0212 => "\e" . '\$\(D',
52 ISO_ASC => "\e" . '\([BJ]',
53 JIS_KANA => "\e" . '\(I',
54 '2022_KR' => "\e" . '\$\)C',
55 SJIS_C => '[\x81-\x9f\xe0-\xfc][\x40-\x7e\x80-\xfc]',
56 SJIS_KANA => '[\xa1-\xdf]',
57 UTF8 => '[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]'
58 );
59
601;
61
62=head1 NAME
63
64Encode::CJKConstants.pm -- Internally used by Encode::??::ISO_2022_*
65
66=cut
Note: See TracBrowser for help on using the repository browser.