Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks

From my application on Windows I lunch a Webbrowser with a specific URI with the following

openURI{ my $query="hallo"; # Note, $query is utf8 encoded my $url="http://" . ".webpage.cc/?s=" . $query; my $commandline = qq{start "$url" "$url"}; system($commandline) == 0 or die qq{Couldn't launch '$commandline': $!/$?}; }

This works perfectly execpt if $query contains letters such as "δόφ". In this case the Webbrowser is opened with a URL containing wrong characters instead of "δόφ". The problem is of course with the encodings. Unfortunately I do not have any idea how can I pass the URI properly to the Webbrowser. Any suggestion?

Replies are listed 'Best First'.
Re: Pass UTF8 URI to Webbrowser
by Anonymous Monk on Mar 17, 2016 at 11:41 UTC

    Just add the following and it works:

    use URI::Escape; $query =uri_escape_utf8( $query );