I got it working
apt-get install liburi-encode-perl
use LWP::UserAgent;
use URI::Encode;
my $t1 = 'Testing æøå ÆØÅ';
my $uri = URI::Encode->new( { encode_reserved => 0 } );
$message = $uri->encode($t1);
send_notify('** Alarmmonitor **',$message,45,1,$peter);
And it works.
So in my subroutine i just have to encode title and message.
sub send_notify
{
my ($title, $mess, $sound, $icon, $dev) = @_;
my $uri = URI::Encode->new( { encode_reserved => 0 } );
$title = $uri->encode($title);
$mess = $uri->encode($mess);
LWP::UserAgent->new()->post(
"
https://www.pushsafer.com/api",[
"t" => $title, # Title
"m" => $mess, # Message
"s" => $sound, # Sound
"v" => 2, # Vibration
"i" => $icon, # Icon
"c" => 0, # IconColor
"d" => $dev, # Device
"k" => "0X2xxxfdtergzzzxxxx" # key
]);
send_notify('Title Testing æøå ÆØÅ','Message Testing æøå ÆØÅ',45,1,$peter);
Thanks
Peter