utf8.cgi (474B)
1 #!/usr/bin/perl 2 # 3 # [w3m-dev 03783] 4 # Install it in $LIB/utf8.cgi and configure keymap as 5 # keymap "x u" GOTO file:/$LIB/utf8.cgi 6 # 7 $conv = "lv -Iu -Oe"; 8 # $conv = "iconv -f UTF-8 -t EUC-JP"; 9 $type = $ENV{W3M_TYPE} || "text/plain"; 10 $url = $ENV{W3M_URL}; 11 $file = $ENV{W3M_SOURCEFILE}; 12 -f $file || exit; 13 $| = 1; 14 print <<EOF; 15 Content-Type: $type; charset=EUC-JP 16 17 EOF 18 if ($type =~ /^text\/html/i && $url) { 19 print "<BASE HREF=\"$url\">\n"; 20 } 21 exec split(" ", $conv), $file;