Danish øæå in message

Pushsafer make it easy and safe to get push-notifications in real time on your Android or Windows mobile device, iPhone, iPad and Desktop!

Mit Pushsafer kann man in Echtzeit, einfach und sicher, Push-Benachrichtigungen auf sein iPhone, iPad, Android oder Windows Gerät sowie auf den Desktop senden lassen!

======================
Google Play
App Store
Windows Store
Homepage
petercal

Danish øæå in message

Postby petercal » 7. Aug 2018, 14:43

Hi,

Message are not shown if i use Danish øæå characters in message.

isn't that possible ?

thanks
Peter

User avatar
admin
Site Admin
Posts: 944
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Danish øæå in message

Postby admin » 7. Aug 2018, 14:50

All works fine also with danish characters
IMG_9993.jpg
IMG_9993.jpg (19 KiB) Viewed 5609 times
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

petercal

Re: Danish øæå in message

Postby petercal » 7. Aug 2018, 14:59

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

petercal

[Solved] Danish øæå in message

Postby petercal » 7. Aug 2018, 18:46

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

User avatar
admin
Site Admin
Posts: 944
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Danish øæå in message

Postby admin » 7. Aug 2018, 20:27

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


Who is online

Users browsing this forum: StevenCivy and 58 guests