File Coverage

blib/lib/ShiftJIS/X0213/MapUTF/Supplements.pm
Criterion Covered Total %
statement 11 11 100.0
branch 4 4 100.0
condition 4 6 66.6
subroutine 5 5 100.0
pod 2 2 100.0
total 26 28 92.8


line stmt bran cond sub pod time code
1             package ShiftJIS::X0213::MapUTF::Supplements;
2              
3 2     2   1753 use strict;
  2         5  
  2         63  
4 2     2   10 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
  2         2  
  2         126  
5 2     2   8 use vars qw(%Supplements);
  2         4  
  2         461  
6              
7             require Exporter;
8             @ISA = qw(Exporter);
9              
10             @EXPORT = qw(to_sjis0213_supplements to_sjis2004_supplements);
11             @EXPORT_OK = qw(%Supplements);
12              
13             $VERSION = '0.40';
14              
15             %Supplements = (
16             0x00B5, # MICRO SIGN (ISO/IEC 8859-1 11/05)
17             "\x83\xCA", # GREEK SMALL LETTER MU (U+03BC)
18              
19             0x0110, # LATIN CAPITAL LETTER D WITH STROKE (ISO/IEC 8859-2 13/00)
20             "\x85\x66", # LATIN CAPITAL LETTER ETH (U+00D0)
21              
22             0x2015, # HORIZONTAL BAR
23             "\x81\x5C", # EM DASH (U+2014)
24              
25             0x2211, # N-ARY SUMMATION (Windows CP932 0x8794)
26             "\x83\xB0", # GREEK CAPITAL LETTER SIGMA (U+03A3)
27              
28             0x2985, # LEFT WHITE PARENTHESIS
29             "\x81\xD4", # FULLWIDTH LEFT WHITE PARENTHESIS (U+FF5F)
30              
31             0x2986, # RIGHT WHITE PARENTHESIS
32             "\x81\xD5", # FULLWIDTH RIGHT WHITE PARENTHESIS (U+FF60)
33              
34             0x3099, # COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK
35             "\xDE", # HALFWIDTH KATAKANA VOICED SOUND MARK (U+FF9E) // NFKC
36              
37             0x309A, # COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
38             "\xDF", # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK (U+FF9F) // NFKC
39              
40             0x4E44, # CJK UNIFIED IDEOGRAPH-4E44 (JIS X 0212 16-17)
41             "\x81\x59", # IDEOGRAPHIC CLOSING MARK (U+3006)
42              
43             0x9B1C, # CJK UNIFIED IDEOGRAPH-9B1C (for backward compatibility)
44             "\xFC\x5A", # CJK UNIFIED IDEOGRAPH-9B1C
45              
46             0x9B1D, # CJK UNIFIED IDEOGRAPH-9B1D (JIS X 0213:2000)
47             "\xFC\x5A", # CJK UNIFIED IDEOGRAPH-9B1C
48              
49             0xFF3C, # FULLWIDTH REVERSE SOLIDUS
50             "\x81\x5F", # REVERSE SOLIDUS (U+005C)
51              
52             0xFF5E, # FULLWIDTH TILDE
53             "\x81\xB0", # TILDE (U+007E)
54              
55             0xFFE0, # FULLWIDTH CENT SIGN
56             "\x81\x91", # CENT SIGN (U+00A2)
57              
58             0xFFE1, # FULLWIDTH POUND SIGN
59             "\x81\x92", # POUND SIGN (U+00A3)
60              
61             0xFFE2, # FULLWIDTH NOT SIGN
62             "\x81\xCA", # NOT SIGN (U+00AC)
63              
64             0xFFE4, # FULLWIDTH BROKEN BAR
65             "\x85\x44", # BROKEN BAR (U+00A6)
66             );
67              
68 56 100 66 56 1 6488 sub to_sjis0213_supplements { defined $_[0] && $Supplements{$_[0]} || '' }
69 56 100 66 56 1 7721 sub to_sjis2004_supplements { defined $_[0] && $Supplements{$_[0]} || '' }
70              
71             1;
72             __END__