Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / usr / share / doc / w3m / examples / Bonus / | server ip : 172.67.156.115 your ip : 108.162.242.53 H O M E |
Filename | /usr/share/doc/w3m/examples/Bonus/utf8.cgi |
Size | 474 |
Permission | rw-r--r-- |
Owner | root : root |
Create time | 27-Apr-2025 09:56 |
Last modified | 04-Jan-2014 19:15 |
Last accessed | 07-Jul-2025 19:02 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/usr/bin/perl
#
# [w3m-dev 03783]
# Install it in $LIB/utf8.cgi and configure keymap as
# keymap "x u" GOTO file:/$LIB/utf8.cgi
#
$conv = "lv -Iu -Oe";
# $conv = "iconv -f UTF-8 -t EUC-JP";
$type = $ENV{W3M_TYPE} || "text/plain";
$url = $ENV{W3M_URL};
$file = $ENV{W3M_SOURCEFILE};
-f $file || exit;
$| = 1;
print <<EOF;
Content-Type: $type; charset=EUC-JP
EOF
if ($type =~ /^text\/html/i && $url) {
print "<BASE HREF=\"$url\">\n";
}
exec split(" ", $conv), $file;
#
# [w3m-dev 03783]
# Install it in $LIB/utf8.cgi and configure keymap as
# keymap "x u" GOTO file:/$LIB/utf8.cgi
#
$conv = "lv -Iu -Oe";
# $conv = "iconv -f UTF-8 -t EUC-JP";
$type = $ENV{W3M_TYPE} || "text/plain";
$url = $ENV{W3M_URL};
$file = $ENV{W3M_SOURCEFILE};
-f $file || exit;
$| = 1;
print <<EOF;
Content-Type: $type; charset=EUC-JP
EOF
if ($type =~ /^text\/html/i && $url) {
print "<BASE HREF=\"$url\">\n";
}
exec split(" ", $conv), $file;