[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:04174] info2www jp patch for dwww
- From: mkojima@xxxxxxxxxxxx (Motoyasu KOJIMA)
- Subject: [debian-users:04174] info2www jp patch for dwww
- Date: Sun, 8 Feb 1998 00:52:32 +0900
- X-ml-info: If you have a question, send a mail with the body "# help" (without quotes) to the address debian-users-ctl@debian.or.jp
- X-ml-name: debian-users
- X-mlserver: fml [fml 2.1A#41]; post only from members
- Message-id: <199802071550.AAA06822@xxxxxxxxxxxxxxxxxxxxxxxx>
- X-mail-count: 04174
- X-mailer: mnews [version 1.21] 1997-12/23(Tue)
小島基靖と申します.
使い勝手が悪いのか,ちっとも はやらない(笑)
Debian の ドキュメントデータベース dwww の話です.
日本語 info ファイルが文字化けする件を直してみました.
/usr/lib/cgi-bin にある info2www に以下の patch を当ててください.
日本語変換に jcode.pl が必要なので,jcodepl パッケージをいれてください.
Package: jcodepl
Version: 2.3-1
Depends: perl
Description: Perl library for Japanese character code conversion
日本語が読める WWWブラウザがあれば,
apache,dwww, info2www, menu パッケージをいれることで,
http://localhost/dwww/index.html
からたどっていって,info が読めます.
これで,info の使い方を忘れられるかな?
-----
小島基靖 Private E-mail: mkojima@xxxxxxxxxxxx
--- info2www.org Sun Mar 23 23:50:09 1997
+++ info2www Sat Feb 7 22:02:30 1998
@@ -146,6 +146,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 --------------------------------------------------------
@@ -160,6 +165,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'};
@@ -215,7 +224,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)";
}
@@ -272,7 +281,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;
@@ -304,6 +313,8 @@
$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!
@@ -735,7 +746,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) {
@@ -745,7 +756,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) {