오픈 소스 소프트웨어 개발 및 다운로드

Browse Subversion Repository

Contents of /trunk/installer/rev_conv.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3221 - (show annotations) (download) (as text)
Tue Mar 24 09:37:20 2009 UTC (15 years, 2 months ago) by maya
File MIME type: text/x-perl
File size: 660 byte(s)
CVS から SVN へ移行: trunk に集約
1
2 #
3 # Shift_JIS‚đƒL[‚Ć‚ľ‚️‡‚ɏo—Í‚ˇ‚é
4 #
5
6 $file = 'SHIFTJIS_TXT.htm';
7
8 &read_mapfile($file);
9 exit();
10
11 sub read_mapfile {
12 my($file) = @_;
13 my(%table, $val, $key);
14
15 open(FP, $file) || die "error";
16 while ($line = <FP>) {
17 if ($line =~ /^\#/) {next;}
18 if ($line =~ m+^\/+) {next;}
19 if ($line =~ m+^\<+) {next;}
20 $line =~ s/^\s+//;
21 @column = split(/\s+/, $line);
22
23 $val = int(hex($column[0])); # Unicode
24 # print "$column[0] -> $column[1] ($val)\n";
25 $table{$val} = hex($column[1]);
26 # printf "%d => %x\n", $val, $table{$val};
27 }
28 close(FP);
29
30 foreach $key (sort {$a <=> $b} keys %table) {
31 printf " { 0x%04X, 0x%04X },\n", $key, $table{$key};
32 }
33 }
34

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26