diff options
author | yshl <yshl@takechiyo.net> | 2015-07-28 11:58:02 +0000 |
---|---|---|
committer | yshl <yshl@takechiyo.net> | 2015-07-28 11:58:02 +0000 |
commit | 9a82b18c721a40d58b86792fc7740bd33607ec85 (patch) | |
tree | 43ae10ff9e1555c0bb05e195a11b841599aa67af | |
parent | Update ChangeLog (diff) | |
download | w3m-9a82b18c721a40d58b86792fc7740bd33607ec85.tar.gz w3m-9a82b18c721a40d58b86792fc7740bd33607ec85.zip |
modified: Bonus/goodict.cgi, use Encode.pm instead of NKF
Diffstat (limited to '')
-rwxr-xr-x | Bonus/goodict.cgi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Bonus/goodict.cgi b/Bonus/goodict.cgi index 8f443c1..5106c89 100755 --- a/Bonus/goodict.cgi +++ b/Bonus/goodict.cgi @@ -5,7 +5,8 @@ # w: file:/cgi-bin/goodict.cgi?%s # j: file:/cgi-bin/goodict.cgi?%s -use NKF; +use Encode; +use Encode::Guess qw/euc-jp utf8/; #$mode = 0; # substring $mode = 1; # perfect match #$mode = 3; # search body text @@ -22,7 +23,7 @@ s@^[ewjs]:@@ && s@^//@@ && s@/$@@; if ($_) { s/\+/ /g; s/%([\da-f][\da-f])/pack('C', hex($1))/egi; - $_ = nkf("-e", $_); + $_ = encode("utf8", decode("Guess", $_)); s/[\000-\040\+:#?&%<>"\177-\377]/sprintf('%%%02X', unpack('C', $&))/eg; $url .= "/search.php?MT=$_&kind=$kind&mode=$mode"; } else { |