3 # * Copyright 2003-2007 Paul Mangan <paul@claws-mail.org>
5 # * This file is free software; you can redistribute it and/or modify it
6 # * under the terms of the GNU General Public License as published by
7 # * the Free Software Foundation; either version 3 of the License, or
8 # * (at your option) any later version.
10 # * This program is distributed in the hope that it will be useful, but
11 # * WITHOUT ANY WARRANTY; without even the implied warranty of
12 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # * General Public License for more details.
15 # * You should have received a copy of the GNU General Public License
16 # * along with this program; if not, write to the Free Software
17 # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # Feb 2007: add support for non ISO-8859-1 compatible locales
22 # by Alex Gorbachenko <agent_007@immo.ru>
26 use POSIX
qw(locale_h);
29 my $freshmeat = "http://freshmeat.net/search?q";
32 $locale = setlocale
(LC_CTYPE
);
35 $converter = Text
::Iconv
->new("$locale", "UTF-8");
36 $safe=uri_escape
($converter->convert("$_"));
38 chdir($ENV{HOME
} . "/.claws-mail") || die("Can't find your .claws-mail directory\n");
40 open (SYLRC
, "<clawsrc") || die("Can't open the clawsrc file\n");
44 foreach $rcline (@rclines) {
45 if ($rcline =~ m/^uri_open_command/) {
47 @browser = split(/=/, $rcline);
48 $browser[1] =~ s/%s/$freshmeat=$safe/;
52 system("$browser[1]&");