1 |
|
2 |
=head1 NAME
|
3 |
|
4 |
Encode::Table::JISEditions --- Code point unification tables of
|
5 |
JIS coded character sets
|
6 |
|
7 |
=cut
|
8 |
|
9 |
package Encode::Table::JISEditions;
|
10 |
use strict;
|
11 |
our $VERSION=do{my @r=(q$Revision: 1.1 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
|
12 |
|
13 |
my $start94n = 0xE9F6C0;
|
14 |
my $start1978 = $start94n + 94*94*(0x40-0x30);
|
15 |
my $start1983 = $start94n + 94*94*(0x42-0x30);
|
16 |
my $start1990 = $start94n + 94*94*79;
|
17 |
my $start2000 = $start94n + 94*94*(0x4F-0x30);
|
18 |
|
19 |
for (0..94*94-1) {
|
20 |
$Encode::Table::TABLE{jisx0208_1978_to_1983__cpunify}->{chr ($_ + $start1978)} = chr ($_ + $start1983);
|
21 |
$Encode::Table::TABLE{jisx0208_1978_to_1990__cpunify}->{chr ($_ + $start1978)} = chr ($_ + $start1990);
|
22 |
$Encode::Table::TABLE{jisx0208_1983_to_1990__cpunify}->{chr ($_ + $start1983)} = chr ($_ + $start1990);
|
23 |
}
|
24 |
$Encode::Table::TABLE{jisx0208_1983_to_1978__cpunify} = {reverse %{$Encode::Table::TABLE{jisx0208_1978_to_1983__cpunify}}};
|
25 |
$Encode::Table::TABLE{jisx0208_1990_to_1978__cpunify} = {reverse %{$Encode::Table::TABLE{jisx0208_1978_to_1990__cpunify}}};
|
26 |
$Encode::Table::TABLE{jisx0208_1990_to_1983__cpunify} = {reverse %{$Encode::Table::TABLE{jisx0208_1983_to_1990__cpunify}}};
|
27 |
|
28 |
my $startlatin = 0xE90940 + 94*(ord ('J')-0x30);
|
29 |
for (0..93) {
|
30 |
$Encode::Table::TABLE{jisx0201_latin_to_ascii__cpunify}->{chr ($startlatin + $_)} = chr ($_ + 0x21);
|
31 |
}
|
32 |
$Encode::Table::TABLE{ascii_to_jisx0201_latin__cpunify} = {reverse %{$Encode::Table::TABLE{jisx0201_latin_to_ascii__cpunify}}};
|
33 |
|
34 |
my @hw = split //, q(!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~);
|
35 |
my @fw = qw(¡ª ¢° ¡ô ¡ð ¡ó ¡õ ¢¯ ¡Ê ¡Ë ¡ö ¡Ü ¡¤ ¡Ý ¡¥ ¡¿ £° £± £² £³ £´ £µ £¶ £· £¸ £¹ ¡§ ¡¨ ¡ã ¡á ¡ä ¡© ¡÷ £Á £Â £Ã £Ä £Å £Æ £Ç £È £É £Ê £Ë £Ì £Í £Î £Ï £Ð £Ñ £Ò £Ó £Ô £Õ £Ö £× £Ø £Ù £Ú ¡Î ¡À ¡Ï ¡° ¡² ¡® £á £â £ã £ä £å £æ £ç £è £é £ê £ë £ì £í £î £ï £ð £ñ £ò £ó £ô £õ £ö £÷ £ø £ù £ú ¡Ð ¡Ã ¡Ñ ¢²);
|
36 |
for (0..93) {
|
37 |
$Encode::Table::TABLE{jisx0208_1990_to_ascii}->{chr ($start1990 + (ord ($fw[$_]) - 0xA1) * 94 + (ord (substr ($fw[$_], 1)) - 0xA1))} = $hw[$_];
|
38 |
}
|
39 |
$Encode::Table::TABLE{ascii_to_jisx0208_1990} = {reverse %{$Encode::Table::TABLE{jisx0208_1990_to_ascii}}};
|
40 |
|
41 |
my $startkatakana = 0xE90940 + 94*(ord ('I')-0x30);
|
42 |
@hw = qw(Ž¡ Ž¢ Ž£ Ž¤ Ž¥ Ž¦ Ž§ Ž¨ Ž© Žª Ž« Ž¬ Ž Ž® Ž¯ Ž° Ž± Ž² Ž³ Ž´ Žµ Ž¶ Ž· Ž¸ Ž¹ Žº Ž» Ž¼ Ž½ Ž¾ Ž¿ ŽÀ ŽÁ ŽÂ ŽÃ ŽÄ ŽÅ ŽÆ ŽÇ ŽÈ ŽÉ ŽÊ ŽË ŽÌ ŽÍ ŽÎ ŽÏ ŽÐ ŽÑ ŽÒ ŽÓ ŽÔ ŽÕ ŽÖ Ž× ŽØ ŽÙ ŽÚ ŽÛ ŽÜ ŽÝ ŽÞ Žß);
|
43 |
@fw = qw(¡£ ¡Ö ¡× ¡¢ ¡¦ ¥ò ¥¡ ¥£ ¥¥ ¥§ ¥© ¥ã ¥å ¥ç ¥Ã ¡¼ ¥¢ ¥¤ ¥¦ ¥¨ ¥ª ¥« ¥ ¥¯ ¥± ¥³ ¥µ ¥· ¥¹ ¥» ¥½ ¥¿ ¥Á ¥Ä ¥Æ ¥È ¥Ê ¥Ë ¥Ì ¥Í ¥Î ¥Ï ¥Ò ¥Õ ¥Ø ¥Û ¥Þ ¥ß ¥à ¥á ¥â ¥ä ¥æ ¥è ¥é ¥ê ¥ë ¥ì ¥í ¥ï ¥ó ¡« ¡¬);
|
44 |
for (0..0x3E) {
|
45 |
$Encode::Table::TABLE{jisx0208_1990_to_jisx0201_katakana}->{chr ($start1990 + (ord ($fw[$_]) - 0xA1) * 94 + (ord (substr ($fw[$_], 1)) - 0xA1))} = chr ($startkatakana + ord (substr ($hw[$_], 1)) - 0xA1);
|
46 |
}
|
47 |
$Encode::Table::TABLE{jisx0201_katakana_to_jisx0208_1990} = {reverse %{$Encode::Table::TABLE{jisx0208_1990_to_jisx0201_katakana}}};
|
48 |
|
49 |
1;
|
50 |
|
51 |
=head1 SEE ALSO
|
52 |
|
53 |
L<Encode::Table>
|
54 |
|
55 |
=head1 LICENSE
|
56 |
|
57 |
Copyright 2002 Nanashi-san
|
58 |
|
59 |
This library is free software; you can redistribute it
|
60 |
and/or modify it under the same terms as Perl itself.
|
61 |
|
62 |
=cut
|
63 |
|
64 |
# $Date: 2002/10/12 11:03:00 $
|
65 |
### JISEditions.pm ends here
|