--- info2www.orig	2002-08-24 09:38:26.000000000 +0900
+++ info2www	2003-06-21 05:08:33.000000000 +0900
@@ -156,6 +156,11 @@
 $LOCK_SH = 1; $LOCK_EX = 2; $LOCK_NB = 4; $LOCK_UN = 8;
 
 #
+# if japanese info file exist, use "jcode.pl".
+#
+$USE_JCODEPL = 1;
+
+#
 #----------------- CONFIGURATION END -------------------------------------------
 
 #----------------- MAIN --------------------------------------------------------
@@ -170,6 +175,10 @@
 $CACHE_OPENED = 0;
 $NFILES = 0;
 @INFOPATH = grep(-d, @INFOPATH); # Only search existing directories
+if ($USE_JCODEPL) {
+       require 'jcode.pl';
+       &jcode'init();
+}
 
 $SCRIPT_NAME = $ENV{'SCRIPT_NAME'};
 $SERVER_NAME = $ENV{'SERVER_NAME'};
@@ -225,7 +234,7 @@
 } elsif (@ARGV) {
     # The argument string is already decoded, bet special characters are
     # backslash escaped: \(gcc\)Invoking\ GCC
-    ($nodename = join('+', @ARGV)) =~ s/\\(\W)/$1/g;;
+    ($nodename = join('+', @ARGV)) =~ s/\\(\e)/$1/g;;
 } else {
     $nodename = "(dir)";
 }
@@ -282,7 +291,7 @@
     $fullnode = "($node_file)$node_name";
     
     ($target = $node_name) =~ tr/A-Z/a-z/;
-    ($regexp = $target) =~ s/(\W)/\\$1/g; # Escape special characters
+    ($regexp = $target) =~ s/(\e)/\\$1/g; # Escape special characters
     $DEBUG && &Debug("Nodename: $node\nfile: $node_file\ntarget: $target");
 
     ($file, $pos) = &TryCache("($node_file)$target", $regexp) if $CACHE;
@@ -314,6 +323,7 @@
 	$handle = $file;
 	$DEBUG && &Debug("Now reading from $handle");
 	while ($_ = (shift @INPUT || scalar(<$handle>))) {
+	    &jcode'convert(*_, 'euc') if ($USE_JCODEPL);
 	    $orglen = length($_);
 	    chop;
 	    #study;			# study actually seems to hurt!
@@ -744,7 +754,7 @@
     }
     $DEBUG && &Debug("FindFileNoAlt: \"$name\", Alt=\"$aname\"");
 
-    ($regexp = $name) =~ s/(\W)/\\$1/g; # Escape special characters
+    ($regexp = $name) =~ s/(\e)/\\$1/g; # Escape special characters
     if ($name =~ /\.gz$|\.Z$/) {
 	# Don't add gzip'ped and compress file to the regular expression
     } elsif (@GZCAT && @ZCAT) {
@@ -754,7 +764,7 @@
     } elsif (@ZCAT) {
 	$regexp .= "(\\.Z)?";
     }
-    ($aregexp = $aname) =~ s/(\W)/\\$1/g; # Escape special characters
+    ($aregexp = $aname) =~ s/(\e)/\\$1/g; # Escape special characters
     if (@GZCAT && @ZCAT) {
 	$aregexp .= "(\\.gz|\\.Z)?";
     } elsif (@GZCAT) {

