line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Jcode::CP932::H2Z; |
2
|
13
|
|
|
13
|
|
76
|
use strict; |
|
13
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
15463
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our %_H2Z = ( |
5
|
|
|
|
|
|
|
"\x{ff61}" => "\x{3002}", #。 |
6
|
|
|
|
|
|
|
"\x{ff62}" => "\x{300c}", #「 |
7
|
|
|
|
|
|
|
"\x{ff63}" => "\x{300d}", #」 |
8
|
|
|
|
|
|
|
"\x{ff64}" => "\x{3001}", #、 |
9
|
|
|
|
|
|
|
"\x{ff65}" => "\x{30fb}", #・ |
10
|
|
|
|
|
|
|
"\x{ff66}" => "\x{30f2}", #ヲ |
11
|
|
|
|
|
|
|
"\x{ff67}" => "\x{30a1}", #ァ |
12
|
|
|
|
|
|
|
"\x{ff68}" => "\x{30a3}", #ィ |
13
|
|
|
|
|
|
|
"\x{ff69}" => "\x{30a5}", #ゥ |
14
|
|
|
|
|
|
|
"\x{ff6a}" => "\x{30a7}", #ェ |
15
|
|
|
|
|
|
|
"\x{ff6b}" => "\x{30a9}", #ォ |
16
|
|
|
|
|
|
|
"\x{ff6c}" => "\x{30e3}", #ャ |
17
|
|
|
|
|
|
|
"\x{ff6d}" => "\x{30e5}", #ュ |
18
|
|
|
|
|
|
|
"\x{ff6e}" => "\x{30e7}", #ョ |
19
|
|
|
|
|
|
|
"\x{ff6f}" => "\x{30c3}", #ッ |
20
|
|
|
|
|
|
|
"\x{ff70}" => "\x{30fc}", #ー |
21
|
|
|
|
|
|
|
"\x{ff71}" => "\x{30a2}", #ア |
22
|
|
|
|
|
|
|
"\x{ff72}" => "\x{30a4}", #イ |
23
|
|
|
|
|
|
|
"\x{ff73}" => "\x{30a6}", #ウ |
24
|
|
|
|
|
|
|
"\x{ff74}" => "\x{30a8}", #エ |
25
|
|
|
|
|
|
|
"\x{ff75}" => "\x{30aa}", #オ |
26
|
|
|
|
|
|
|
"\x{ff76}" => "\x{30ab}", #カ |
27
|
|
|
|
|
|
|
"\x{ff77}" => "\x{30ad}", #キ |
28
|
|
|
|
|
|
|
"\x{ff78}" => "\x{30af}", #ク |
29
|
|
|
|
|
|
|
"\x{ff79}" => "\x{30b1}", #ケ |
30
|
|
|
|
|
|
|
"\x{ff7a}" => "\x{30b3}", #コ |
31
|
|
|
|
|
|
|
"\x{ff7b}" => "\x{30b5}", #サ |
32
|
|
|
|
|
|
|
"\x{ff7c}" => "\x{30b7}", #シ |
33
|
|
|
|
|
|
|
"\x{ff7d}" => "\x{30b9}", #ス |
34
|
|
|
|
|
|
|
"\x{ff7e}" => "\x{30bb}", #セ |
35
|
|
|
|
|
|
|
"\x{ff7f}" => "\x{30bd}", #ソ |
36
|
|
|
|
|
|
|
"\x{ff80}" => "\x{30bf}", #タ |
37
|
|
|
|
|
|
|
"\x{ff81}" => "\x{30c1}", #チ |
38
|
|
|
|
|
|
|
"\x{ff82}" => "\x{30c4}", #ツ |
39
|
|
|
|
|
|
|
"\x{ff83}" => "\x{30c6}", #テ |
40
|
|
|
|
|
|
|
"\x{ff84}" => "\x{30c8}", #ト |
41
|
|
|
|
|
|
|
"\x{ff85}" => "\x{30ca}", #ナ |
42
|
|
|
|
|
|
|
"\x{ff86}" => "\x{30cb}", #ニ |
43
|
|
|
|
|
|
|
"\x{ff87}" => "\x{30cc}", #ヌ |
44
|
|
|
|
|
|
|
"\x{ff88}" => "\x{30cd}", #ネ |
45
|
|
|
|
|
|
|
"\x{ff89}" => "\x{30ce}", #ノ |
46
|
|
|
|
|
|
|
"\x{ff8a}" => "\x{30cf}", #ハ |
47
|
|
|
|
|
|
|
"\x{ff8b}" => "\x{30d2}", #ヒ |
48
|
|
|
|
|
|
|
"\x{ff8c}" => "\x{30d5}", #フ |
49
|
|
|
|
|
|
|
"\x{ff8d}" => "\x{30d8}", #ヘ |
50
|
|
|
|
|
|
|
"\x{ff8e}" => "\x{30db}", #ホ |
51
|
|
|
|
|
|
|
"\x{ff8f}" => "\x{30de}", #マ |
52
|
|
|
|
|
|
|
"\x{ff90}" => "\x{30df}", #ミ |
53
|
|
|
|
|
|
|
"\x{ff91}" => "\x{30e0}", #ム |
54
|
|
|
|
|
|
|
"\x{ff92}" => "\x{30e1}", #メ |
55
|
|
|
|
|
|
|
"\x{ff93}" => "\x{30e2}", #モ |
56
|
|
|
|
|
|
|
"\x{ff94}" => "\x{30e4}", #ヤ |
57
|
|
|
|
|
|
|
"\x{ff95}" => "\x{30e6}", #ユ |
58
|
|
|
|
|
|
|
"\x{ff96}" => "\x{30e8}", #ヨ |
59
|
|
|
|
|
|
|
"\x{ff97}" => "\x{30e9}", #ラ |
60
|
|
|
|
|
|
|
"\x{ff98}" => "\x{30ea}", #リ |
61
|
|
|
|
|
|
|
"\x{ff99}" => "\x{30eb}", #ル |
62
|
|
|
|
|
|
|
"\x{ff9a}" => "\x{30ec}", #レ |
63
|
|
|
|
|
|
|
"\x{ff9b}" => "\x{30ed}", #ロ |
64
|
|
|
|
|
|
|
"\x{ff9c}" => "\x{30ef}", #ワ |
65
|
|
|
|
|
|
|
"\x{ff9d}" => "\x{30f3}", #ン |
66
|
|
|
|
|
|
|
"\x{ff9e}" => "\x{309b}", #゛ |
67
|
|
|
|
|
|
|
"\x{ff9f}" => "\x{309c}", #゜ |
68
|
|
|
|
|
|
|
); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
our %_D2Z = ( |
71
|
|
|
|
|
|
|
"\x{ff76}\x{ff9e}" => "\x{30ac}", #ガ |
72
|
|
|
|
|
|
|
"\x{ff77}\x{ff9e}" => "\x{30ae}", #ギ |
73
|
|
|
|
|
|
|
"\x{ff78}\x{ff9e}" => "\x{30b0}", #グ |
74
|
|
|
|
|
|
|
"\x{ff79}\x{ff9e}" => "\x{30b2}", #ゲ |
75
|
|
|
|
|
|
|
"\x{ff7a}\x{ff9e}" => "\x{30b4}", #ゴ |
76
|
|
|
|
|
|
|
"\x{ff7b}\x{ff9e}" => "\x{30b6}", #ザ |
77
|
|
|
|
|
|
|
"\x{ff7c}\x{ff9e}" => "\x{30b8}", #ジ |
78
|
|
|
|
|
|
|
"\x{ff7d}\x{ff9e}" => "\x{30ba}", #ズ |
79
|
|
|
|
|
|
|
"\x{ff7e}\x{ff9e}" => "\x{30bc}", #ゼ |
80
|
|
|
|
|
|
|
"\x{ff7f}\x{ff9e}" => "\x{30be}", #ゾ |
81
|
|
|
|
|
|
|
"\x{ff80}\x{ff9e}" => "\x{30c0}", #ダ |
82
|
|
|
|
|
|
|
"\x{ff81}\x{ff9e}" => "\x{30c2}", #ヂ |
83
|
|
|
|
|
|
|
"\x{ff82}\x{ff9e}" => "\x{30c5}", #ヅ |
84
|
|
|
|
|
|
|
"\x{ff83}\x{ff9e}" => "\x{30c7}", #デ |
85
|
|
|
|
|
|
|
"\x{ff84}\x{ff9e}" => "\x{30c9}", #ド |
86
|
|
|
|
|
|
|
"\x{ff8a}\x{ff9e}" => "\x{30d0}", #バ |
87
|
|
|
|
|
|
|
"\x{ff8a}\x{ff9f}" => "\x{30d1}", #ビ |
88
|
|
|
|
|
|
|
"\x{ff8b}\x{ff9e}" => "\x{30d3}", #ブ |
89
|
|
|
|
|
|
|
"\x{ff8b}\x{ff9f}" => "\x{30d4}", #ベ |
90
|
|
|
|
|
|
|
"\x{ff8c}\x{ff9e}" => "\x{30d6}", #ボ |
91
|
|
|
|
|
|
|
"\x{ff8c}\x{ff9f}" => "\x{30d7}", #パ |
92
|
|
|
|
|
|
|
"\x{ff8d}\x{ff9e}" => "\x{30d9}", #ピ |
93
|
|
|
|
|
|
|
"\x{ff8d}\x{ff9f}" => "\x{30da}", #プ |
94
|
|
|
|
|
|
|
"\x{ff8e}\x{ff9e}" => "\x{30dc}", #ペ |
95
|
|
|
|
|
|
|
"\x{ff8e}\x{ff9f}" => "\x{30dd}", #ポ |
96
|
|
|
|
|
|
|
"\x{ff73}\x{ff9e}" => "\x{30f4}", #ヴ |
97
|
|
|
|
|
|
|
#"\x{ff9c}\x{ff9e}" => "\x{30f7}", #ワ゛ |
98
|
|
|
|
|
|
|
#"\x{ff66}\x{ff9e}" => "\x{30fa}", #ヲ゛ |
99
|
|
|
|
|
|
|
); |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# init only once; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
our %_Z2H = reverse %_H2Z; |
104
|
|
|
|
|
|
|
our %_Z2D = reverse %_D2Z; |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub h2z { |
107
|
13
|
|
|
13
|
|
84
|
no warnings qw(uninitialized); |
|
13
|
|
|
|
|
25
|
|
|
13
|
|
|
|
|
3410
|
|
108
|
10
|
|
|
10
|
0
|
16
|
my $r_str = shift; |
109
|
10
|
|
|
|
|
14
|
my ($keep_dakuten) = @_; |
110
|
10
|
|
|
|
|
16
|
my $n = 0; |
111
|
10
|
50
|
|
|
|
29
|
unless ($keep_dakuten) { |
112
|
10
|
|
|
|
|
121
|
$n = ( |
113
|
|
|
|
|
|
|
$$r_str =~ s{ |
114
|
|
|
|
|
|
|
([\x{ff61}-\x{ff9f}][\x{ff9e}\x{ff9f}]?) |
115
|
|
|
|
|
|
|
} { |
116
|
168
|
|
|
|
|
219
|
my $str = $1; |
117
|
168
|
100
|
100
|
|
|
3645
|
$_D2Z{$str} || $_H2Z{$str} || |
118
|
|
|
|
|
|
|
# in case dakuten and handakuten are side-by-side! |
119
|
|
|
|
|
|
|
$_H2Z{substr($str,0,1)} . $_H2Z{substr($str,1,1)}; |
120
|
|
|
|
|
|
|
}eogx |
121
|
|
|
|
|
|
|
); |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
else { |
124
|
0
|
|
|
|
|
0
|
$n = ( |
125
|
|
|
|
|
|
|
$$r_str =~ s{ |
126
|
|
|
|
|
|
|
([\x{ff61}-\x{ff9f}]) |
127
|
|
|
|
|
|
|
} { |
128
|
0
|
|
|
|
|
0
|
$_H2Z{$1}; |
129
|
|
|
|
|
|
|
}eogx |
130
|
|
|
|
|
|
|
); |
131
|
|
|
|
|
|
|
} |
132
|
10
|
|
|
|
|
30
|
$n; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub z2h { |
136
|
13
|
|
|
13
|
|
75
|
no warnings qw(uninitialized); |
|
13
|
|
|
|
|
30
|
|
|
13
|
|
|
|
|
1908
|
|
137
|
4
|
|
|
4
|
0
|
6
|
my $r_str = shift; |
138
|
4
|
|
|
|
|
102
|
my $n = ( |
139
|
|
|
|
|
|
|
$$r_str =~ s{ |
140
|
|
|
|
|
|
|
([\x{3001}\x{3002}\x{300c}\x{300d}\x{309b}\x{309c}\x{30a1}-\x{30fc}]) |
141
|
|
|
|
|
|
|
} { |
142
|
182
|
100
|
100
|
|
|
1091
|
$_Z2D{$1} || $_Z2H{$1} || $1; |
143
|
|
|
|
|
|
|
}eogx |
144
|
|
|
|
|
|
|
); |
145
|
4
|
|
|
|
|
21
|
$n; |
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
1; |
149
|
|
|
|
|
|
|
__END__ |