support 5.8.1 only.
authorimiyazaki <imiyazaki>
Fri, 7 Nov 2003 16:18:30 +0000 (16:18 +0000)
committerimiyazaki <imiyazaki>
Fri, 7 Nov 2003 16:18:30 +0000 (16:18 +0000)
remove using redirection temporarily.

makefonts.pl

index 8c224e4..ebb7dc3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -w -CSD
 # This script requires 't1asm' program, which is part of t1utils package,
 # and 'pfaedit'.
 
@@ -6,11 +6,13 @@ use strict;
 use utf8;
 use IO::Socket::INET;
 use BerkeleyDB;
+require 5.008001;
 
 my $omegadb_path="/usr/local/lib/chise/omega"; # set to the path of your db and script.
 
-my $kageaddr="kage2.fonts.jp:80"; # Specify port number!
-my $kagecgi="/~kamichi/test/kagecgi.cgi"; #
+#my $kageaddr="home.fonts.jp:5100"; # Specify port number!
+my $kageaddr="home.fonts.jp:5101"; # Specify port number!
+#my $kagecgi="/~kamichi/test/kagecgi.cgi"; #
 
 my $t1asm = "/usr/bin/env t1asm"; # point to 't1asm' executable.
 #die "Cannot execute $t1asm. Abort.\n" unless -x $t1asm;
@@ -154,26 +156,25 @@ BLACKBOX
             if($kageserver = IO::Socket::INET->new("$kageaddr")){
                 print $kageserver "HEAD /$request.svg HTTP/1.1\r\n";
                 print $kageserver "Host: $kageaddr\r\n\r\n";
-                #Get redirection info.
-                local $/="\r\n";
-                while(<$kageserver>){
-                    chomp;
-                    next unless m|^location:\s+http://([a-z0-9.:]+)/|i;
-                    $location=$1;
-                }
-                close($kageserver);
-                print STDERR "Connecting $location...\n";
-                if($location
-                   and $kageserver=IO::Socket::INET->new($location)){
-                    print $kageserver "GET /$request.svg HTTP/1.1\r\n";
-                    print $kageserver "Host: $location\r\n\r\n";
+#               #Get redirection info.
+#               local $/="\r\n";
+#               while(<$kageserver>){
+#                   chomp;
+#                   next unless m|^location:\s+http://([a-z0-9.:]+)/|i;
+#                   $location=$1;
+#               }
+#               close($kageserver);
+#               if($location
+#                  and $kageserver=IO::Socket::INET->new($location)){
+#                   print $kageserver "GET /$request.svg HTTP/1.1\r\n";
+#                   print $kageserver "Host: $location\r\n\r\n";
                     local $/; $svg=<$kageserver>;
                     close($kageserver);
                     $svg =~ s/\r//gm; # remove CR.
                     $svg =~ s/^.+\n\n//ms; # remove HTTP header.
-                }else{
-                    $svg="error";
-                }
+#               }else{
+#                   $svg="error";
+#               }
             }else{
                 print STDERR "Cannot connect to KAGE server at $kageaddr.\n";
                 $svg="error";
@@ -207,7 +208,7 @@ my ($font_start, $ids_start, %ids);
 if(-e $idsdata){
     # "require" doesn't work well.
     # I don't know why...
-    open (my $data, "<$idsdata");
+    open (my $data, "<:utf8","$idsdata");
     while(<$data>){
        eval $_;
     }