#!/usr/bin/perl use warnings; use strict; #use utf8::all; # placed here the decoding dosn't work right use Gtk2 -init; # commenting out Gtk2 modules fixes problem use Glib qw(FALSE TRUE); use Gtk2::Pango; use Encode qw(decode); use utf8::all; #placed here, the decoding works properly $|++; my $search_str = $ARGV[0]; $search_str ||= undef; print "argv-> @ARGV \n"; print "search-> $search_str\n"; __END__