Skip Menu |

This queue is for tickets about the Net-APNS CPAN distribution.

Report information
The Basics
Id: 96526
Status: new
Priority: 0/
Queue: Net-APNS

People
Owner: Nobody in particular
Requestors: raymond.field [...] mvine.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: _message_encode fails if input is already uft8
Date: Wed, 18 Jun 2014 11:03:23 +0100
To: <bug-Net-APNS [...] rt.cpan.org>
From: Raymond Field <raymond.field [...] mvine.com>
"decode"ing to utf8 an already utf8 enabled string produces garbage: use utf8; my $string = "£"; # UK pound symbol, hex = a3 print encode( 'unicode', decode( 'utf8', $string ) ); prints garbage (i.e. black diamond with a question mark) proposed change to Net::APNS::Notification: sub _message_encode { my $self = shift; return encode( 'unicode', is_utf8($self->message)?$self->message:decode( 'utf8', $self->message ) ); } returns £ as expected.