Hi,
Message are not shown if i use Danish øæå characters in message.
isn't that possible ?
thanks
Peter
Danish øæå in message
- admin
- Site Admin
- Posts: 1006
- Joined: 1. Dec 2014, 12:41
- Location: Germany
Re: Danish øæå in message
All works fine also with danish characters
Kevin
What device you have? How you send your notification?Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Re: Danish øæå in message
Hi Kevin
I'm sending from a perl script to iPhone SE
sub send_notify
{
my ($title, $mess, $sound, $icon, $dev) = @_;
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" => "0X24KMnbgtrxxxxxxxxx" # key
]);
}
$message = "!! TYVERI ALARM !! modtaget fra Dørkontakt";
send_notify('** Alarmmonitor **',$message,27,1,$peterID);
thanks,
peter
I'm sending from a perl script to iPhone SE
sub send_notify
{
my ($title, $mess, $sound, $icon, $dev) = @_;
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" => "0X24KMnbgtrxxxxxxxxx" # key
]);
}
$message = "!! TYVERI ALARM !! modtaget fra Dørkontakt";
send_notify('** Alarmmonitor **',$message,27,1,$peterID);
thanks,
peter
[Solved] Danish øæå in message
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
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
- admin
- Site Admin
- Posts: 1006
- Joined: 1. Dec 2014, 12:41
- Location: Germany
Re: Danish øæå in message
Great Peter!
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Who is online
Users browsing this forum: No registered users and 60 guests